Bug 412582 - Canvas Pointer-Lock cannot be exited anymore
Summary: Canvas Pointer-Lock cannot be exited anymore
Status: RESOLVED UPSTREAM
Alias: None
Product: Falkon
Classification: Applications
Component: general (other bugs)
Version First Reported In: 3.1.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords: accessibility, usability
Depends on:
Blocks:
 
Reported: 2019-10-03 21:24 UTC by Armin Leghissa
Modified: 2024-01-10 08:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Armin Leghissa 2019-10-03 21:24:19 UTC
SUMMARY
On web-apps utilising a canvas object, e.g. WebGL applications
can make advantage of the Pointer-Lock mechanism.
So it is possible to navigate like in a FPS shooter or thelike in a WebGL app.
Hitting ESC or another key action, the programmer defined before, shall exit
that pointer Lock state ageain. The cursor should get visible again.

Locking works on Falkon.
But releasing it again seems not do be possible/properly working.

STEPS TO REPRODUCE
1. Go to following demo: https://mdn.github.io/dom-examples/pointer-lock/
2. Follow the instruction there, click into the canvas to get your pointer locked.
3. Instructions say: to exit lock, hit ESC key, but this doesn't work.

OBSERVED RESULT
It seems, that the corresponding Javascript calls weren't executed/interpreted
accordingly. The Pointer lock cannot be exited anymore.
Only quitting Falkon resets this state.

I also tested other Web-apps and also self-made ones.
Following piece of Javascript requests Pointer Lock:

canvas.requestPointerLock ||
        canvas.mozRequestPointerLock ||
        canvas.webkitRequestPointerLock;

And following snippet shall release it again:

document.exitPointerLock ||
        document.mozExitPointerLock ||
        document.webkitExitPointerLock;

All mentioned Apps and examples perform properly on Firefox and as well on Chromium.

EXPECTED RESULT
ESC Key or otherwise connected event shall trigger the Release of the Pointer-Lock again.
It works as described on Firefox and as well on Chromium.

SOFTWARE/OS VERSIONS
Windows: --
macOS: --
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.0

ADDITIONAL INFORMATION
URL for testing pointer lock: https://mdn.github.io/dom-examples/pointer-lock
Comment 1 Juraj 2024-01-10 08:48:08 UTC
QT issue.
It works fine with Qt5.15 and even in Qt6.

The provided link to a demo throws an errors in the web console (In Qt6 version):
> caught (in promise) DOMException: The options asked for in this request are not supported on this platform.
The Chromium is doing the same thing on my machine, so I think it can be blamed for this as well.

Thank you for reporting.

My platform: Artixlinux (HW) and KDE Neon (QEMU)