Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Prevent auto-zooming when form field gets focus. Fixes #755 #838

Merged
merged 1 commit into from
Nov 26, 2018

Conversation

bluemarvin
Copy link
Contributor

No description provided.

@bluemarvin bluemarvin requested review from cvan and caseyyee November 26, 2018 20:47
Copy link
Contributor

@caseyyee caseyyee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Works for me!

As per @keianhzo, the editable text field is the one that triggers zoom for me, but no longer seems to be an issue here.

Also tested a few login pages and zoom doesn't appear to be an issue any longer.

I think the zoom behavior is also controlled by meta viewport max and minimum zoom, which probably explains why it happens on some sites and not others.

Copy link
Contributor

@cvan cvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested this on https://webxr.sh/editable and various login forms, including GMail, Outlook, and Wikipedia 👍

@@ -706,6 +706,7 @@ private void vrPrefsWorkAround(Context aContext, Bundle aExtras) {
out.write("pref(\"webgl.enable-surface-texture\", true);\n".getBytes());
out.write("pref(\"apz.allow_double_tap_zooming\", false);\n".getBytes());
out.write("pref(\"dom.webcomponents.customelements.enabled\", true);\n".getBytes());
out.write("pref(\"formhelper.autozoom\", false);\n".getBytes());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Copy link
Contributor

@cvan cvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ship it! 👍

@@ -706,6 +706,8 @@ private void vrPrefsWorkAround(Context aContext, Bundle aExtras) {
out.write("pref(\"webgl.enable-surface-texture\", true);\n".getBytes());
out.write("pref(\"apz.allow_double_tap_zooming\", false);\n".getBytes());
out.write("pref(\"dom.webcomponents.customelements.enabled\", true);\n".getBytes());
// Prevent autozoom when giving a form field focus.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: or a <div contenteditable>

@bluemarvin bluemarvin merged commit cc5f95d into master Nov 26, 2018
@bluemarvin bluemarvin deleted the prevent-zoom branch November 26, 2018 23:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants