-
-
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
passivefalseeverywhere #3690
passivefalseeverywhere #3690
Conversation
src/mixins/canvas_events.mixin.js
Outdated
@@ -228,8 +228,8 @@ | |||
removeListener(fabric.document, 'mousemove', this._onMouseMove); | |||
removeListener(fabric.document, 'touchmove', this._onMouseMove); | |||
|
|||
addListener(this.upperCanvasEl, 'mousemove', this._onMouseMove); | |||
addListener(this.upperCanvasEl, 'touchmove', this._onMouseMove); | |||
addListener(this.upperCanvasEl, 'mousemove', this._onMouseMove, { passive: false }); |
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.
Only needed on touch events, so this one is redundant :-)
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.
right!
copy paste speed error
Are we sure this is fixed? Chrome seems to be scrolling the window now when you use touch and drag. I confirmed this only started happening after updating to the latest version of Chrome on an Android phone. I just tested with fabricJS 1.7.6 to see if it would fix it (I think I was running 1.5 before) and it still doesn't work. |
I have nothing scrollable, so i cannot really confirm. i fixed reading the specs from the mdn/ and chrome website. i ll get a scrollable device soon |
Thank you. FYI, if you open this demo on an Android phone and zoom in a bit until the window can scroll up and down, you can see the error when you try moving the object: http://fabricjs.com/touch-events For some reason, this doesn't happen in the kitchen sink demo! I'd love to know why. |
please check the version of that demo. i guess is based on fabric 1.5
…On Feb 28, 2017 12:38 AM, "Samuel Kilada" ***@***.***> wrote:
Thank you. FYI, if you open this demo on and Android phone and zoom in a
bit until the window can scroll up and down, you can see the error:
http://fabricjs.com/touch-events
For some reason, this doesn't happen in the kitchen sink demo!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#3690 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABI4QGvJ85mNnJU3Q51uNHD2PeUtJwh8ks5rg15zgaJpZM4L_PHX>
.
|
Interesting! Kitchen sink uses http://fabricjs.com/lib/fabric.js, which is currently 1.7.6 and uses all modules except gestures and a couple others!
The broken touch events demo uses http://fabricjs.com/lib/fabric_with_gestures.js, but yes it is 1.5.0, which explains it. I wonder if I should not use the gestures module since in the kitchen sink dmeo it seems to avoid the error without that module and works fine on touch. :S |
gesture module is for pinch and rotate i guess. i will update that demo
page with the modern build as soon i update the website for 1.7.7
…On Feb 28, 2017 7:23 AM, "Samuel Kilada" ***@***.***> wrote:
Interesting! Kitchen sink uses http://fabricjs.com/lib/fabric.js, which
is currently 1.7.6 and uses all modules except gestures and a couple others!
/* build:node build.js modules=ALL exclude=json,gestures minifier=uglifyjs
*/
The broken touch events demo uses http://fabricjs.com/lib/
fabric_with_gestures.js, but yes it is 1.5.0, which explains it. I wonder
if I should not use the gestures module since in the kitchen sink dmeo it
seems to avoid the error without that module and works fine on touch. :S
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#3690 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABI4QOGH3VbXgn7b4rl7IAgFN1pk3R6wks5rg71ygaJpZM4L_PHX>
.
|
Well, I must say I just made a really stupid mistake. In thinking that I was applying the updated version of Fabric I was actually not. 1.7.6 does indeed fix the problem Chrome introduced. I think the touch events demo running on 1.5.0 is what threw me off. Thanks very much for the quick responses. |
close #3687
Add { passive: false } to every touch event.
Add relevant code to bring down the option object to the actual addEventListener function
Add check to make sure old browser do not get the option object ( that would equal to
useCapture
true )