Skip to content

Fix bug in Safari where number input field click-and-drag can't be released #2876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 15, 2025

Conversation

seabeeberry
Copy link
Contributor

@seabeeberry seabeeberry commented Jul 13, 2025

Closes #2038

I put the definition of the event target and call of requestPointerLock() immediately within the onDragPointerDown handler, as this is expected for Safari to handle the pointerlock properly. I removed the event parameter from the function call for beginDrag() because it is no longer needed there.

I tested this to work properly for the following browsers:

  • Safari
  • Firefox
  • Firefox Nightly
  • Chrome

Edit: I confused the comment about this bug happening in Nightly as well from a different open issue.

@seabeeberry seabeeberry changed the title Fixes #2038: Click-and-drag number fields can now be released in Safari and Firefox Nightly Fixes #2038: Click-and-drag number fields can now be released in Safari Jul 13, 2025
@Keavon
Copy link
Member

Keavon commented Jul 14, 2025

!build

Copy link

📦 Build Complete for d716dd4
https://0fef6a9f.graphite.pages.dev

@Keavon Keavon changed the title Fixes #2038: Click-and-drag number fields can now be released in Safari Fix bug in Safari where number input field click-and-drag can't be released Jul 15, 2025
@Keavon Keavon enabled auto-merge (squash) July 15, 2025 00:29
@Keavon Keavon merged commit f40cc3f into GraphiteEditor:master Jul 15, 2025
4 checks passed
@Keavon
Copy link
Member

Keavon commented Jul 15, 2025

Thank you!

@Keavon
Copy link
Member

Keavon commented Jul 15, 2025

I didn't test thoroughly enough before merging this with clicking for text entry, and I've realized this breaks things in a huge way, so I reverted this PR. Please open a new one that fixes the problem and we'll give it another try from there.

The issue is that, upon clicking a text input field, it immediately tries to begin dragging. Now that I look at the changed code more closely, that is why we have the existing method with the comment

// If it's a mouseup, we'll begin editing the text field.

so you'll need to find some other approach that keeps the existing functionality.

Thanks.

@seabeeberry
Copy link
Contributor Author

The issue is that, upon clicking a text input field, it immediately tries to begin dragging. Now that I look at the changed code more closely, that is why we have the existing method with the comment

// If it's a mouseup, we'll begin editing the text field.

so you'll need to find some other approach that keeps the existing functionality.

Ahh, I see. Sorry, I did not think to check the text fields. I will try and find a way without breaking other functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Safari-specific JS debugging: Click-and-drag number fields can't be released
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy