noVNC icon indicating copy to clipboard operation
noVNC copied to clipboard

Add dragViewport() capability to elements in vnc.html

Open CawthorneB opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. Toggle on screen keyboard 'from code' works for android with a call to showVirtualKeyboard() but this doesn't work for iOS, so I have achieved this by creating overlaying elements in vnc.html and passing the focus to the noVNC_keyboardinput element. Click works, but the elements I'm creating which overlay input fields, then pass focus to noVNC_keyboardinput and toggle the onscreen keyboard are not able to be scrolled over (touchmove). That is to say dragViewport() doesnt apply to them as they sit in vnc.html similar to the anchor bar. These overlay elements therefore act as unresponsive space on the screen when user wants to scroll a page (drag the viewport).

Describe the solution you'd like It would be a cleaner solution to pass touchmove events from these 'input overlay elements' to call dragViewport() depending on touchpressure/time.

Describe alternatives you've considered The most sensible thing I've attempted was adding this in vnc.html: import { default as RFB } from "./core/rfb.js"; overlayDiv.addEventListener("gesturestart", RFB._eventHandlers.handleGesture); overlayDiv.addEventListener("gesturemove", RFB._eventHandlers.handleGesture); overlayDiv.addEventListener("gestureend", RFB._eventHandlers.handleGesture);

Additional context My original solution came from this answer which may help clarify what I mean by 'input overlay elements': https://stackoverflow.com/a/55425845.

Thank you very much for your time.

CawthorneB avatar Sep 12 '22 22:09 CawthorneB