Fixes #2038: Safari click and drag fix#2916
Closed
seabeeberry wants to merge 2 commits into
Closed
Conversation
…compatibility for dragging
af3d4de to
94d10a6
Compare
Keavon
reviewed
Jul 22, 2025
| target.requestPointerLock(); | ||
|
|
||
| beginDrag(); | ||
| removeEventListener("pointermove", onMove); |
Member
There was a problem hiding this comment.
Isn't this now leaking the pointermove event now that we are sometimes early returning before this line? Seems like the target.requestPointerLock(); and beginDrag(); lines should be inside the if statement instead of the early return in its inverse.
… is not an instance of HTMLElement
Contributor
Author
|
After testing again, the "fixed" behavior in Safari is not working anymore, even when reverting to the initial commit. I have to close this PR as it does not solve the initial fix. |
Member
|
Weird:/ good luck continuing to investigate! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2038
For the last PR, I had put the
target.requestPointerLock();immediately inside theonDragPointerDownfunction which made dragging possible for Safari but crashed the possibility of text input within the number fields. The current solution I've found which both fixes the dragging issues for Safari and keeps the text input possibility the same as before is moving thetarget.requestPointerLock();to the event handler definitiononMove:This seems to work reliably on Safari, Firefox and Chrome.
Let me know if it needs any changes!