Closed Bug 1624780 Opened 5 years ago Closed 1 years ago

Firefox zooms page when pressing 'Ctrl' after scrolling with two fingers on trackpad

Categories

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

74 Branch
x86_64
Windows 10
defect

Tracking

()

RESOLVED DUPLICATE of bug 1199737

People

(Reporter: f.borghei97, Unassigned, Mentored)

Details

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

Steps to reproduce:

I first noticed this whenever I was scrolling down a webpage and then quickly closed the tab using the keyboard shortcut 'Ctrl' + 'W'. As I go to press 'Ctrl', I see the tab that I am closing (and the tab that I land on after close) zoom in/out as it still captures the swipe up/down even after I have completed the gesture.

This works especially well if you do a relatively harder swipe gesture so that the scroll velocity is greater/longer.

This was done on my ASUS ZenBook Flip S UX370UA running Windows Version 1809 (Build 17763.1098)

Actual results:

Webpage zooms in/out after a quick 'Ctrl' keypress after a swipe up/down gesture with two fingers on a laptop trackpad.

My theory is that the event that is being captured is the scroll velocity produced from the gesture rather than the actual trackpad event action (i.e. recognizing swipe action simultaneously with 'Ctrl' keypress).

Expected results:

Essentially nothing should happen as I am not simultaneously pressing 'Ctrl' and swiping up/down. The 'Ctrl' keypress was AFTER the trackpad swipe gesture.

I just to want to clarify that by scroll velocity, I should rather say scroll momentum as even disabling smooth scrolling produces the same result. So even when the page isn't actually scrolling and I press 'Ctrl' the page still zooms.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core
Type: enhancement → defect
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64

I am able to reproduce it with my ThinkPad X1, Win10.

Priority: -- → P3

I wouldn't mind working on this bug if possible! However, it would be my first bug so some mentorship wold help greatly

Flags: needinfo?(htsai)

(In reply to f.borghei97 from comment #4)

I wouldn't mind working on this bug if possible! However, it would be my first bug so some mentorship wold help greatly

It would be so great to have your contribution! I'll work with my team to assign a mentor here. :D

Flags: needinfo?(htsai)

I am happy to help.

Mentor: echen

(In reply to Edgar Chen [:edgar] from comment #6)

I am happy to help.

Hi Edgar,

I am super excited to start working on this! So I've managed to build firefox (in artifact mode) using Windows Subsystem for Linux (WSL), however I am not able to navigate to any website or do most of the functions on the Firefox Nightly browser. I am not sure if this is expected or not.

Additionally, what would be the best course of action when going about a bug like this? Are there any nuances of firefox's front-end that would be helpful to know before starting?

Thanks a ton for helping me out on this, I am looking forward to working with you!

Sincerely,

Faraz

(In reply to Hsin-Yi Tsai [:hsinyi] from comment #5)

(In reply to f.borghei97 from comment #4)

I wouldn't mind working on this bug if possible! However, it would be my first bug so some mentorship wold help greatly

It would be so great to have your contribution! I'll work with my team to assign a mentor here. :D

Thank you Hsin-Yi!

(In reply to f.borghei97 from comment #7)

I've managed to build firefox (in artifact mode) using Windows Subsystem for Linux (WSL), however I am not able to navigate to any website or do most of the functions on the Firefox Nightly browser. I am not sure if this is expected or not.

Sorry, I have no idea, I have never build Firefox on WSL.

Additionally, what would be the best course of action when going about a bug like this? Are there any nuances of firefox's front-end that would be helpful to know before starting?

I could no reproduce this bug on Mac, it looks like a Window-specific bug to me, but I am not able to verify on Linux at the moment.
If this is a window-specific bug, to develop under Windows, you could reference https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Windows_Prerequisites. :)

Another thing we could do first is to try older version of firefox (for example, 57) to see if this is a regression or a long-existing bug.

Here is the platform code that notify front-end the zoom change (so front-end could have corresponding UI changes, like the zoom level in URL bar)
https://searchfox.org/mozilla-central/rev/fa2df28a49883612bd7af4dacd80cdfedcccd2f6/dom/events/EventStateManager.cpp#2188-2202
I think this might be a good entry point to understand how we handle UI event and zoom changes.

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression
Keywords: regression

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3

I believe this is a dup of bug 1199737.

Status: UNCONFIRMED → RESOLVED
Closed: 1 years ago
Duplicate of bug: 1199737
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.