-
-
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
patch(Canvas): move event mouse:up:before earlier in the logic for more control #9434
Conversation
Build Stats
|
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.
LGTM. For a long-term solution, returning false from handleEvent
sounds a better solution, or even checking event. defaultPrevented
on the event.
definately, I agree |
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.
Changed isClick
to populate only on up events including up:before
Removed used #9450currentTarget
currentSubTargets
from the event data
11d4356
to
cd988b8
Compare
cd988b8
to
54dc9a5
Compare
Motivation
I want to disable mouseup default behavior from the
mouse:up:before
eventIn mouse down it is possible with
delete canvas._target
, seefabric.js/src/canvas/Canvas.ts
Lines 1061 to 1063 in 9c8e102
In mouse up it isn't because of the order of execution.
So I changed the
const target
to be defined after themouse:up:before
event is calledDescription
Please add this to beta15
Changes
Gist
In Action