-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fix #8182 by adding a check for left mouse click. #8183
Conversation
if (_mouseupTimeoutId !== null) { | ||
_mouseupTimeoutId = window.setTimeout(function () { | ||
// if we get a double-click,_mouseupTimeoutId will have been set to lull by the double-click handler before this runs. Also double check to make sure it only happens on left mouse clicks. | ||
if (_mouseupTimeoutId !== null && event.which === 1) { |
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.
We should test event.which
at the very beginning of the mouseup handler (so we don't do any of this logic if the original click wasn't a left click).
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.
Also, minor nit I just noticed: the comment above says _mouseupTimeoutId will have been set to lull
. I think you meant lulz
. Er, I mean null
. (Also missing a space after the comma.)
Yup, it looks like this fixes it. Reviewed with a couple of notes. |
FYI, this bug is getting in my way, so I copied this fix locally on Win7. I am now seeing these exceptions in console:
Note: I think this happens when I click again before timeout happens. |
My fix #8194 worked, but I closed it in favor of this one (Sorry for the dupe). |
Well, both |
@SAplayer I don't think that's the reason - It's weird - I can't reproduce @redmunds' exception on Windows. I thought maybe it was a shell version thing, but it doesn't seem to happen for me in any of the versions we've been using. Anyway, it seems clear that |
Closing in favor of #8194. |
This should fix #8182 . @peterflynn can you double check?