Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Back button getting large when scrolling up when already at top of screen #14829

Closed
joelwass opened this issue Jul 24, 2018 · 2 comments
Closed

Comments

@joelwass
Copy link

I couldn't find this issue in current open issues, but it's similar to #14785 but only only happens when scrolling vertically when you're already at the top or bottom of the page.

Description

It's pretty easy to describe in code. Basically, the back/forward button is growing when it shouldn't be, i.e. when i'm scrolling vertically when i'm already at the top or bottom of the page.

ipc.on('scroll-touch-edge', () => {
      if (trackingFingers) {
        if (!isSwipeOnRightEdge && deltaX > 0) {
          isSwipeOnRightEdge = true
          isSwipeOnLeftEdge = false
          time = 0
          deltaX = 0
        } else if (!isSwipeOnLeftEdge && deltaX < 0) {
          isSwipeOnLeftEdge = true
          isSwipeOnRightEdge = false
          time = 0
          deltaX = 0
        }
      }
    })

This chunk of code is the issue, it currently doesn't check to see if you're at a top or bottom edge, but rather fires this event if you're at any edge at all and scrolling. So when I'm trying to scroll up, but I'm already at the top of the page, it will inaccurately show the back button (or forward button) grow bigger or smaller. Attached is a gif

bug1

Steps to Reproduce

  1. Open a new tab in brave
  2. Navigate to a new url (so the back button is enabled)
  3. Scroll slightly as if you're trying to swipe back (on a trackpad) to a previous page (this breaks the seal of the back button growing or not)
  4. Scroll up when you're already at the top of the page

Actual result:

See above gif

Expected result:
Expected result is for the back (or forward) button to not grow when scrolling vertically at the top or bottom of a page.

Reproduces how often:

100%

Brave Version

about:brave info:

Brave: 0.23.39
V8: 6.7.288.46
rev: 3ee14b0
Muon: 7.1.6
OS Release: 16.7.0
Update Channel: Release
OS Architecture: x64
OS Platform: macOS
Node.js: 7.9.0
Brave Sync: v1.4.2
libchromiumcontent: 67.0.3396.103

Reproducible on current live release:

Yes

Additional Information

joelwass added a commit to joelwass/browser-laptop that referenced this issue Jul 24, 2018
@bsclifton bsclifton added this to the Completed work milestone Jul 26, 2018
darkdh added a commit that referenced this issue Aug 30, 2018
only fire once each scroll since C69

mainly
fix #15114

also
fix #14871
fix #14829
fix #14785

Auditor: @bsclifton
@darkdh darkdh modified the milestones: Completed work, 0.23.x w/ Chromium 69 (BETA Channel) Aug 30, 2018
@darkdh
Copy link
Member

darkdh commented Aug 30, 2018

fixed by 69851d1

@LaurenWags
Copy link
Member

LaurenWags commented Sep 4, 2018

Verified with macOS 10.12.6 using

  • 0.23.203 16c2c19
  • Muon 8.1.2
  • libchromiumcontent 69.0.3497.72

Verified with macOS 10.12.6 using the following build:

  • 0.23.203 16c2c19
  • Muon: 8.1.2
  • libchromiumcontent: 69.0.3497.72

bsclifton pushed a commit that referenced this issue Sep 11, 2018
only fire once each scroll since C69

mainly
fix #15114

also
fix #14871
fix #14829
fix #14785

Auditor: @bsclifton
bsclifton pushed a commit that referenced this issue Sep 14, 2018
only fire once each scroll since C69

mainly
fix #15114

also
fix #14871
fix #14829
fix #14785

Auditor: @bsclifton
bsclifton pushed a commit that referenced this issue Sep 18, 2018
only fire once each scroll since C69

mainly
fix #15114

also
fix #14871
fix #14829
fix #14785

Auditor: @bsclifton
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.