Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#9289 closed enhancement (fixed)

Adding the original event to the onClick call in Tree widget

Reported by: genro Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:


I am suggesting here to add the parameter 'event' to the onClick call in the Tree widget as in many circumstances the user interface could use the event modifiers to perform a more specific action. So for example a Shift click on a tree item could act differently than a pure click or an alt + click. It can be easily implemented to dijit Tree with the following changes :

line 882:

  • this.onClick(nodeWidget.item, nodeWidget);

+ this.onClick(nodeWidget.item, nodeWidget, e);

line 929

  • onClick: function(/* */ item, /*TreeNode?*/ node)

+ onClick: function(/* */ item, /*TreeNode?*/ node,/*Event*/ e)

The same type of behavior could be implemented also for DblClick? and in a more general way when Dijit wraps an event it should pass the original event to the wrapper to allow a better tuning of the interface. So maybe it could be useful also for other widgets.

Thank you

Giovanni Porcari

Change History (3)

comment:1 Changed 13 years ago by bill

Milestone: tbd1.4
Owner: set to bill
Status: newassigned

I checked the other widgets and most/all of them are passing the event already, but I'll update Tree to do so too.

comment:2 Changed 13 years ago by bill

Resolution: fixed
Status: assignedclosed

Fixed in [17523].

comment:3 Changed 11 years ago by liucougar

(In [23483]) refs #9289: properly pass the keypress event to Tree._onEnterKey !strict

Note: See TracTickets for help on using tickets.