Limitations of hover and drag interactions on iOS and UWP

On most platforms, 3D WebView supports native hover and drag interactions through the IWithMovablePointer and IWithPointerDownAndUp interfaces. 3D WebView added support for these interfaces to iOS and Universal Windows Platform (UWP) in v3.13, but the following limitations apply to hovering and dragging on iOS and UWP:

  • WebViewPrefab.HoveringEnabled is automatically set to false by default on iOS and UWP in order to optimize performance. However, you can override this by adding the scripting symbol VUPLEX_NO_DISABLING_HOVER_FOR_PERFORMANCE in player settings.

  • When hovering is enabled via the VUPLEX_NO_DISABLING_HOVER_FOR_PERFORMANCE scripting symbol, web pages can detect hovering via the JavaScript pointermove event, but hovering doesn't trigger the CSS :hover pseudo class like it normally does. So, hovering over links and other elements doesn't cause their style to change unless the page detects hovering via JavaScript instead of CSS.

  • When drag interactions are enabled by setting WebViewPrefab.DragMode to DragWithinPage, the page can detect dragging via the pointerdown, pointerup, and pointermove JavaScript events, but dragging can't be used to select text.

The reason for these limitations is that iOS and UWP don't provide native APIs for triggering pointerdown, pointerup, and pointermove interactions, so 3D WebView simulates them by executing JavaScript in the page.