Re: [noVNC] how to stop 'toggleVirtualKeyboard()' resizing '_canvas'

28 views
Skip to first unread message

Samuel Mannehed

unread,
Aug 1, 2022, 7:41:29 AM8/1/22
to no...@googlegroups.com
Hi,

On 2022-07-28 14:07, G Mallon wrote:
> On a touch device when I display the soft keyboard the noVNC 'canvas'
> element resizes to fit the remaining screen space available. Instead,
> I'd like the soft keyboard to "overlay" or achieve this affect by
> preventing resizing of the 'canvas'. Is there a min-height value or
> boolean I can switch in rfb.js or display.js, etc.?

I'm guessing you're using an Android device? On iOS and iPadOS, the
keyboard works more as an "overlay", like you want.

Unfortunately, on Android the keyboard works differently, and the
browser creates a resize-event. It's difficult to determine if that
resize was triggered by opening the keyboard or by something else.

For your specific case, the easiest solution might be to disable remote
resize and set the session size manually on the remote instead.

If that doesn't work for you, you can try to modify your code in this
function here:

https://github.com/novnc/noVNC/blob/master/core/rfb.js#L728

Regards,
--
Samuel Mannehed Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46 13 214 600
Reply all
Reply to author
Forward
0 new messages