Repository navigation
fix(core): onClick callback does not handle dblclick - #9629
Conversation
Let onClick callback handle double click as before v9.1. Done by adding a event handler for dblclick calling onClick.
|
Is there anyone to have a look, or tell me how to proceed ? Thanks. |
|
@w1nklr does your solution let the developer distinguish a double from a single click? |
|
@Pessimistress I can verify this does indeed provide an event for the second click of the double-click, any reason not to merge? |
Yes. the event holds a |
|
You have a failing test |
Update the test to account that a double click does now trigger onClick callback.
|
I updated the failing test to account that a double click does now trigger the onClick callback. |
| // Trigger onDragStart event | ||
| widgetManager.onEvent(pickedInfo, {type: 'panstart'}); | ||
| // Event not defined | ||
| // Trigger onClick event |
There was a problem hiding this comment.
| // Trigger onClick event | |
| // Trigger dblclick event |
There was a problem hiding this comment.
Actually, it's the same callback onClick() that gets triggered, both by simple click and double click.
That's why I added this comment.
So either we should update all the comments to:
// Trigger click event (resp. dblClick, dragStart...)
or
// Trigger onClick() callback (resp. onClick, onDragStart)
@felixpalmer What do you prefer ?
There was a problem hiding this comment.
I updated the comments
| // Trigger onDragStart event | ||
| widgetManager.onEvent(pickedInfo, {type: 'panstart'}); | ||
| // Event not defined | ||
| // Trigger onClick event |
There was a problem hiding this comment.
| // Trigger onClick event | |
| // Trigger dblclick event |
Let onClick callback handle double click as before v9.1.
Closes #9627
Change List