-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Treat Document Level Touch Event Listeners as Passive #3633
Comments
Possible fix:
|
i m a bit out of sync with the touch events since i do not have any modern tablet and i do not want to bother with my phone. From the lint you posted they say that is behind a flag in current chrome. And will be enabled in 56. |
@asturur I'm always use DEV Chrome on mobile, because i should be ready for future "surprises". Yes it's behind a flag for now, but it should be enabled by default in Chrome 56, and i think we should be ready, 56 version will be released in January, very soon. |
Can you explain better all the thing here? i read all the small link. i figured out is about prevent default. i then looked at the possible fix and i see { passive: false }. did you change anything else? do you have some suggestion to handle some other events? or some suggestion about touch events? |
@asturur need to add a passing options possibility to element.addEventListener(eventName, handler, options), and pass { passive: false } to event, who prevent another event, like touch scroll canvas: _onMouseMove: function (e) { If don't, in new Chrome 56 you can't prevent touchScrolling. |
Sorry for the trouble, this is a breaking change in Chrome 56 to improve scroll performance. Note that your fix won't work correctly on browsers that don't support passing options to |
so touch-action is in place. What else is missing? |
Using the above demo, I don't see a touch-action rule anywhere on the page. If I add a rule like: .canvas-container {
touch-action: none;
} Then the console errors indeed go away (although I don't see the picture actually drag around - just a bunch of |
i swear i added it. i guess i did to the wrong element. does upperCanvas have it? |
oh that page is based on 1.5.0 |
Version
1.7.3
Test Case
http://fabricjs.com/touch-events
Steps to reproduce
Pick up any modern Android with latest Chrome
Open remote Debug
Drag a dog in Demo
See Console warnings
Expected Behavior
preventDefault not ignored
Actual Behavior
preventDefault was ignored
https://www.chromestatus.com/features/5093566007214080
The text was updated successfully, but these errors were encountered: