MouseMove event prevents onClick handler from firing#142
MouseMove event prevents onClick handler from firing#142russellsmith wants to merge 4 commits intophilogb:masterfrom russellsmith:master
Conversation
listeners which prevents Ember.js observables from firing.
boolean is used to indicate the user is click + dragging in the interface and if set will prevent onClick handlers for nodes from firing. onClick events are prevented from firing on line 265 of Extras.js.
|
Whoops, had intended for only the last commit to be in the request. Guess that's not possible? |
There was a problem hiding this comment.
Why are you removing the merge operation? The idea is to clone the object.
There was a problem hiding this comment.
In my application I'm adding Ember.js objects to my the data hash. Ember objects have observer functions tied to data properties that will get fired when a property is modified. The merge operation copies the data but in doing so unsets the observers.
In my case I don't want to have a clone of the object in this hash, I want the object itself so that the object state remains consistent within the application. I hadn't intended for this change to be a part of the pull request, but why does the object need to be cloned in the first place?
This problem occurs when events are handled in the following order:
MouseMove will fire at times even when the mouse is not moving which prevents onClick handlers from firing reliably. This check to see that at least one pixel of movement occurred has alleviated this for me.