Closed Bug 1622894 Opened 5 years ago Closed 5 years ago

nsDOMWindowUtils::ZoomToFocusedInput pans and zooms even if the input is already visible.

Categories

(Core :: Panning and Zooming, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(3 files)

Also, it pans to the top-left of the viewport, which is not great. Chrome pans to the nearest side.

Also, when you're in a big textarea (like the one in bugzilla), and you tap inside the cursor, it zooms out of it when you tap over it, which is again really annoying.

Though that may be a thing Geckoview should fix by not sending the message if the element was already focused / the focus didn't change... :)

https://crisal.io/tmp/input-text-number-pattern.html is a very simple test-case for the first issue.

Flags: needinfo?(emilio)

This should not have any behavior change, but avoids keeping nsIFrame pointers
across calls to ScrollContentIntoView(), which can flush layout and thus is
unsafe.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

When you're zoomed inside a large text-area in GeckoView, we are zooming out
right now which is very disruptive and clearly not what the code intended.

Depends on D67220

When you type in a textarea, and zoom to position the caret, then click, we'll
scroll all the way to the top of the textarea, via:

IMEStateManager::OnClickInEditor -> SetIMEState -> SetInputContext -> mEditable->NotifyIME(EditableListener::NOTIFY_IME_OPEN_VKB);

Even if the keyboard was already displayed. In this case, we're not moving
focus, and panning to the start causes more issues than it fixes. Prevent
zooming to the start of the input in this case, but still do it if we get the
resize event (and thus toggle the keyboard).

Depends on D67221

Perhaps these patches fix bug 1544133 as well?

I think so!

Blocks: 1544133
Flags: needinfo?(emilio)

Making P2 since this impacts Fenix user experience and is subjectively quite annoying when it happens. Thanks for tracking this down!

Priority: -- → P2
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8150539058d
Refactor a bit nsDOMWindowUtils::ZoomToFocusedInput. r=botond
https://hg.mozilla.org/integration/autoland/rev/b50bdc37f8f2
Really prevent to zoom out when ZoomToRect is called with DISABLE_ZOOM_OUT. r=botond
https://hg.mozilla.org/integration/autoland/rev/041c310f2bf7
Don't force-focus the input when we're force-showing the virtual keyboard. r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Regressions: 1627734
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: