You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In fullscreen mode on mobile (in Chrome and Firefox), the keyboard is always overlayed on the content. I'm guessing this is expected behavior, but this leads to a strange situation with respect to the Virtual Keyboard API:
Since boundingRect is (strangely?) only available when overlayContent==true, I'm unable to adapt my content to prevent the keyboard obstructing content (like the textarea being typed into) when in fullscreen.
So it seems that I'd need to do something like this:
document.addEventListener("fullscreenchange",function(){if(document.fullscreenElement){navigator.virtualKeyboard.overlayContent=true;// switch to overlay mode to match "reality" when in fullscreen - this makes boundingRect available which is needed to adapt content}else{navigator.virtualKeyboard.overlayContent=false;// change it back when leaving fullscreen}});
A simple fix for this would be to expose boundingRect when overlayContent is false too (whereas currently all properties of boundingRect are 0), since I'm guessing it's not possible to change the default "overlay" behavior of the virtual keyboard in fullscreen mode.
The text was updated successfully, but these errors were encountered:
josephrocca
changed the title
virtualKeyboard.overlayContent=false is misleading in fullscreen mode - boundingRect should be available regardless of overlayContent value?virtualKeyboard.overlayContent=false is misleading in fullscreen mode [...] boundingRect should be available regardless of overlayContent value?
Dec 28, 2023
josephrocca
changed the title
virtualKeyboard.overlayContent=false is misleading in fullscreen mode [...] boundingRect should be available regardless of overlayContent value?virtualKeyboard.overlayContent=false is misleading in fullscreen mode -- potential solution: boundingRect should be available regardless of overlayContent value?
Dec 28, 2023
josephrocca
changed the title
virtualKeyboard.overlayContent=false is misleading in fullscreen mode -- potential solution: boundingRect should be available regardless of overlayContent value?overlayContent=false is misleading in fullscreen mode -- potential solution: boundingRect should be available regardless of overlayContent value?
Dec 28, 2023
In fullscreen mode on mobile (in Chrome and Firefox), the keyboard is always overlayed on the content. I'm guessing this is expected behavior, but this leads to a strange situation with respect to the Virtual Keyboard API:
Since
boundingRect
is (strangely?) only available whenoverlayContent==true
, I'm unable to adapt my content to prevent the keyboard obstructing content (like the textarea being typed into) when in fullscreen.So it seems that I'd need to do something like this:
A simple fix for this would be to expose
boundingRect
whenoverlayContent
isfalse
too (whereas currently all properties ofboundingRect
are0
), since I'm guessing it's not possible to change the default "overlay" behavior of the virtual keyboard in fullscreen mode.The text was updated successfully, but these errors were encountered: