-
Notifications
You must be signed in to change notification settings - Fork 3
[Virtual Keyboard API] A declarative mechanism to enable overlaycontent? #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As suggested in #13 (duplicate): An extension to Something like this: <meta name="viewport" content="width=device-width, initial-scale=1.0, virtual-keyboard=overlays-content"> Or this: :root {
virtual-keyboard: overlays-content;
} (names to be bikeshed but you get the point) |
Meta viewport would work, but the CSS approach could create contradictions or loops, e.g. say you do this while the keyboard is open in a non-overlay-by-default browser.
|
@BoCupp-Microsoft FYI.. |
BTW, what would we call the opposite value? (Considering that overlays-content may be the default). |
So I was just testing this and it seems that this overlaysContent API is very different from the way that the virtual keyboard overlays content on chromeos or iOS. The demo is https://output.jsbin.com/cosopok/ However, when overlaysContent is enabled, you can never scroll to the bottom of the page, meaning you can't see what you're typing into the bottom input. So unless we change the overlaysContent behavior, this is a different orthogonal feature and will likely never be the default. |
@flackr overlaysContent when set to true, prevents resizing of both layout and visual viewports when the virtual keyboard shows up. Resizing the visual viewport (without resizing the layout viewport) gives the user the ability to pan around the layout viewport within the smaller visual viewport. If we aren't resizing the visual viewport (so no resize event) or the layout viewport, then you do need some event and/or CSS env variable to allow the author to relayout the page. That's why the VK API has geometrychange and env(keyboard-inset-*) so the web authors can adjust just the input control where the user wants to type that gets hidden behind the keyboard without affecting the layout of the entire page. On iOS, the visual viewport is resized, but not the layout viewport. This comment has an example and discussions between us and Apple devs which might be relevant to your question. |
From the explainer, I think this is intended - it's meant for cases where the app will reposition elements itself and IIRC was to prevent resizing the visual viewport on dual-screen devices where the keyboard only occupies half the (dual-screen) viewport. It'd be nice if we could choose behavior, i.e.
|
To add/clarify:
|
I think it may be simpler if we change android to match iOS / CrOS, and then if developers want |
Ah, yup, an app can fairly easily simulate resize-layout so I agree changing default to match iOS/CrOS and |
The Web Editing Working Group just discussed The full IRC log of that discussion |
Porting over from MSEdgeExplainers repo MicrosoftEdge/MSEdgeExplainers#416
@snianu filed:
The text was updated successfully, but these errors were encountered: