reference-browser icon indicating copy to clipboard operation
reference-browser copied to clipboard

Scrolling horizontally in web content makes the BrowserToolbar jiggle

Open jonalmeida opened this issue 6 years ago • 3 comments

Steps to reproduce

  1. Swipe horizontally on any web content.

Expected behavior

  • When interacting with web content horizontally, the toolbar shouldn't move.

Actual behavior

  • It moves (see video below).

Device information

  • Android device: Pixel 2 (Android 9)
  • Reference Browser version: Nightly

shoddybriskjoey

jonalmeida avatar Feb 20 '19 06:02 jonalmeida

Weird. In the behavior we define that we are only interested in vertical scrolls: https://github.com/mozilla-mobile/android-components/blob/master/components/browser/toolbar/src/main/java/mozilla/components/browser/toolbar/behavior/BrowserToolbarBottomBehavior.kt#L55

pocmo avatar Feb 20 '19 08:02 pocmo

Theory: I would if it's because the axes are ViewCompat.SCROLL_AXIS_VERTICAL and ViewCompat.SCROLL_AXIS_HORIZONTAL.

We probably want to make that check then, but I'd be worried about breaking horizontal scrolling then.

jonalmeida avatar Feb 23 '19 00:02 jonalmeida

Reposting from https://github.com/mozilla-mobile/android-components/issues/2695

Currently GV's PZC returns INPUT_RESULT_HANDLED for inner scrolls also (like in the case described here) based on which we will indeed scroll the navbar.

Irrespective of the axis I think this issue will be automagically fixed by https://bugzilla.mozilla.org/show_bug.cgi?id=1627737 which will return INPUT_RESULT_HANDLED_CONTENT for scrolls inside iframes / scrollable divs so I propose waiting for this change to see if there will be anything left to do in A-C.

Mugurell avatar Apr 07 '20 16:04 Mugurell