Open Bug 1670534 Opened 5 years ago Updated 4 years ago

Dragging outside of canvas scrolls page up

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

Firefox 81
defect

Tracking

()

Tracking Status
firefox-esr78 --- wontfix
firefox82 --- wontfix
firefox83 --- wontfix
firefox84 --- wontfix
firefox85 --- fix-optional

People

(Reporter: wjmacfarland, Unassigned)

References

(Regression, )

Details

(Keywords: parity-chrome, regression, reproducible)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

Click within game window on https://unexploredterritories.com/ and drag (to move character.) Release mouse outside of the canvas.

Actual results:

The page scrolls up removing the game window from view.

Expected results:

The page shouldn't scroll at all in this case. Tested in Microsoft Edge and Opera and the correct behavior occurs.

Component: Untriaged → DOM: UI Events & Focus Handling
Keywords: regression
Product: Firefox → Core
Keywords: regression
Attached file reproducible html
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Severity: -- → S2
Flags: needinfo?(enndeakin)

This is some issue related how PresShell::ScrollContentIntoView determines the right scroll position when focusing an element. If the starting document scroll position and/or the height values in the testcase are adjusted, the testcase can be made to not scroll using the same steps.

The focus behaviour seems correct here, but the scrolling behaviour could be modified to not adjust the position under some circumstances that would fix the case here. Not sure what that would be, perhaps don't scroll if the element is already visible but larger that the display?

It doesn't reproduce in other browsers only because the root element doesn't seem to be focusable there.

Flags: needinfo?(enndeakin)

Neil, do you think you could take this bug?

Flags: needinfo?(enndeakin)

Do any JS ninjas know a workaround to this issue for the time being? Hoping to update my web-game to avoid the issue for Firefox users.

Flags: needinfo?(enndeakin)
Severity: S2 → S3
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: