-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix: set user-select none on canvas #591
Conversation
Are you calling |
Yes, I have checked on http://szimek.github.io/signature_pad/.
|
I don't believe |
Sorry, I apologize for my misunderstanding and lack of checking. The loupe will remain, but the following may be a partial solution to write a line.
|
src/signature_pad.ts
Outdated
@@ -87,6 +87,8 @@ export default class SignaturePad extends SignatureEventTarget { | |||
|
|||
this.clear(); | |||
|
|||
this.canvas.style.userSelect = 'none'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in the on
function with the other style adjustments. Also remove this style in the off
function.
## [4.0.2](v4.0.1...v4.0.2) (2022-01-21) ### Bug Fixes * set user-select none on canvas ([#591](#591)) ([59ff331](59ff331))
🎉 This PR is included in version 4.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
On iOS 15, a fast double-tap will trigger an unintended pan event.
I think this is a problem caused by the loupe feature in iOS 15.
It does not occur in iOS 14.
The solution is to always turn off the pan event in the constructor,
instead of switching it in event handling.
I think there is no need to turn the pan event on/off.
Therefore, it is better to stop the pan event in the constructor
so that it is not affected by the browser implementation.
I have checked this patch on the following environments.
I don't have Windows tablet, so I can't check ms-touch-action,
but theoretically it should work.
bug.mp4