w3c / virtual-keyboard

VirtualKeyboard API
https://w3c.github.io/virtual-keyboard/
Other
16 stars 3 forks source link

Non-JS way of tweaking `overlaysContent` #13

Closed bramus closed 2 years ago

bramus commented 2 years ago

Whilst the goal of this API is great, I find it a shortcoming that JS is required to change the value of overlaysContent. Don't know if this is for security reasons or something else, but an extension to meta name="viewport" (or perhaps a new CSS at-rule or property on <html>) to control the behavior seems like something handier.

Something like this:

<meta name="viewport" content="width=device-width, initial-scale=1.0, virtual-keyboard=overlays-content">

Or this:

html {
  virtual-keyboard: overlays-content;
}

(names to be bikeshed but you get the point)

snianu commented 2 years ago

Agreed. A declarative mechanism should be provided by the VK API to set the overlaysContent flag. There is an existing issue already :). I've opened a crbug to track this issue in Chromium.

bramus commented 2 years ago

Duplicate of #3. Closing.