Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358858 - Double-click events may be fired when clicking while moving mouse
Summary: Double-click events may be fired when clicking while moving mouse
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.3 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-26 05:31 EDT by Tim Buschtoens CLA
Modified: 2014-02-27 09:09 EST (History)
4 users (show)

See Also:


Attachments
Patch Proposal for function_isDoubleClick (720 bytes, patch)
2012-05-31 04:17 EDT, Ken Lee CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Buschtoens CLA 2011-09-26 05:31:15 EDT
Moving the mouse and simultaneously clicking will create double-click events as long as the mouse doesn't leave the widget. This can cause unwanted behavior, especially when using mouse-events whith larger widgets. DefaultSelection events are NOT affected by this.
Comment 1 Tim Buschtoens CLA 2011-09-26 05:41:07 EDT
This is caused by unprecise doubleclick detection in EventUtil.js#_isDoubleClick. Selection events are fired by the widgets themselves, therefore it may be widget-specific whether or not this issue exists for those too. 

Relying only on qooxdoo doubleclick-events is currently not an option, as the browser may not fire doubleklick events when the dom changes between the clicks. A clean solution for this issue could be to refactor EventHandler.js and EventHandlerUtil.js to handle all doubleclick detection in the same manner as the key-events.
Comment 2 Ken Lee CLA 2012-05-31 04:17:39 EDT
Created attachment 216553 [details]
Patch Proposal for function_isDoubleClick

A simple patch to this bug disregarding acceptable small deviation of the mouseclicks is to check in the function _isDoubleClick in EventUtil.js if the current event coordinates correspond to the last mousedown event coordinates. Only if they both match, the mouse click will be considered as a double click.

This behavior is more accurate than the current one.
Comment 3 Ken Lee CLA 2013-07-25 11:02:06 EDT
Is there any chance that this bug will be fixed for RAP 2.1.1?
Comment 4 Ken Lee CLA 2014-02-26 09:15:35 EST
Is this bug going to be fixed in RAP 2.3?
Comment 5 Tim Buschtoens CLA 2014-02-26 10:38:12 EST
There is currently no concrete plan to do so. It's not a big task, but we have a lot of those. If it has a high priority I suggest you contact us directly.
Comment 6 Ivan Furnadjiev CLA 2014-02-27 09:09:53 EST
Fixed in master with change https://git.eclipse.org/r/22614