Email or username:

Password:

Forgot your password?
Bramus

Oh nice, @FirefoxNightly now has support for the 'interactive-widget' meta viewport key, to control the viewport resize behaviour when showing a virtual keyboard.

There are 3 values to choose from: resizes-visual, resizes-content, and overlays-content.

You can use one of these values to prevent a `position: fixed` element from getting placed underneath the virtual keyboard.

See developer.chrome.com/blog/view for all details.

Supported in Chrome from Chrome 108. No word from Safari on this.

Visual showing how each value behaves.
10 comments
Šime Vidas

@bramus Last time I checked*, Chrome and Safari default to resizes-visual, and Firefox (and a few other browsers) defaults to resizes-content. If that’s still true, then this new feature will be useful to make Firefox behave like the other browsers.

*mastodon.social/@simevidas/110

Bramus

@simevidas The default in Firefox remains unchanged: it still uses the resizes-content behavior by default.

Chrome also used to do this. We changed the default to resizes-visual in Chrome 108 to align with Safari's behavior.

wakest ⁂

@bramus @FirefoxNightly hey @cheeaun would this help with the weird empty space above the keyboard?

Chee Aun 🤔

@liaizon @bramus looks useful, will need to test it out first.

Bramus

@liaizon @FirefoxNightly @cheeaun I’m not sure what CSS exactly they have used there, but yes: with this you can keep things anchored to just above the virtual keyboard with a simple `position: fixed; bottom: 0`.

(* as long as you don’t pinch-zoom in)

Jonathan Dallas

@bramus I don’t see a WebKit standards position issue for this. Has one been filed? github.com/WebKit/standards-po

Jonathan Dallas

@bramus Ah 😅 I saw this one but for some reason thought it was for a separate feature, my bad. Thanks for sorting me out

Bramus

@doctype_jon it's a bit confusing as the issue started out as a mention of Chrome aligning to MobileSafari's behavior (which landed in Chrome 108), but then got transformed into a request about supporting the meta tag extension.

Kilian Valkhof

@bramus @FirefoxNightly

Nice. Would be great if browsers could also emulate those changes in svh/dvh wink wink nudge nudge.

issues.chromium.org/issues/408

Go Up