mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-12-23 10:11:54 +00:00
Add workaround for a Safari bug where our number input fields can't be released from click-and-drag (#3053)
Added fallback for Safari to trigger a pointerLockChange in case it doesnt fire automatically Co-authored-by: seabeeberry <seri@Mac.fritz.box>
This commit is contained in:
parent
615c035683
commit
36a1453d03
1 changed files with 5 additions and 0 deletions
|
|
@ -365,6 +365,11 @@
|
|||
cumulativeDragDelta = 0;
|
||||
|
||||
document.exitPointerLock();
|
||||
|
||||
// Fallback for Safari in case pointerlockchange never fires
|
||||
setTimeout(() => {
|
||||
if (!document.pointerLockElement) pointerLockChange();
|
||||
}, 0);
|
||||
};
|
||||
const pointerMove = (e: PointerEvent) => {
|
||||
// Abort the drag if right click is down. This works here because a "pointermove" event is fired when right clicking even if the cursor didn't move.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue