Closed Bug 1672204 Opened 5 years ago Closed 5 years ago

Swiping on google maps' bottom sheet returns INPUT_RESULT_HANDLED

Categories

(GeckoView :: IME, defect, P1)

Firefox 82
Unspecified
All
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: petru, Assigned: snorp)

Details

(Whiteboard: [fenix:p1][geckoview:m84])

Found it on Fenix - https://github.com/mozilla-mobile/fenix/issues/16055

When swiping on the maps layout GV correctly sends INPUT_RESULT_HANDLED_CONTENT
When swiping on the bottom sheet GV unexpectedly sends INPUT_RESULT_HANDLED
based on which we animate the dynamic toolbar and the pull to to refresh throbber.

Based on the GV versions that this bug reproduces with I think it's a regression from bug 1633322.

Whiteboard: [fenix:p1]
Flags: needinfo?(botond)

The behaviour I'm seeing is a bit different from what's shown in the gif in the Fenix issue: for me, the bottom sheet slides up and down and the dynamic toolbar moves.

Flags: needinfo?(botond)

That said, I am seeing GV return INPUT_RESULT_HANDLED for the bottom swipe, so that's something to investigate.

It looks like web content is not calling preventDefault() on touchstart events that start on the bottom sheet (nor on the first touchmove event). This is what determines whether GV returns HANDLED (no preventDefault() called) vs. HANDLED_CONTENT (preventDefault() called) in cases where a touch event listener is registered.

(In reply to Botond Ballo [:botond] from comment #3)

It looks like web content is not calling preventDefault() on touchstart events that start on the bottom sheet (nor on the first touchmove event)

And the webpage gets away with this because the page has an empty scroll range, so they don't care about preventing the default browser action (namely, scrolling) because the default browser action is a no-op anyways (except for, in our case, the dynamic toolbar movement).

So, as far as I can tell, our behaviour is expected given this page structure and page JS.

(This is only a "regression" from bug 1633322 in the sense that before that bug, we would always return HANDLED_CONTENT if there was a touch listener, regardless of whether the listener called preventDefault() or not. The purpose of bug 1633322 was to wait for the touch listener to run, and return HANDLED_CONTENT only if the listener called preventDefault(), and the behaviour on this page is an expected consequence of that change.)

Assignee: nobody → snorp
Priority: -- → P1
Whiteboard: [fenix:p1] → [fenix:p1][geckoview:m84]

I believe this was also fixed bug 1663000.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

Moving some input bugs to the new GeckoView::IME component.

Component: General → IME
You need to log in before you can comment on or make changes to this bug.