Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#15600 closed defect (invalid)

Tree: right-click in tree does not select on FF

Reported by: Adam Peller Owned by: bill
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.6.0
Keywords: Cc:
Blocked By: Blocking:


(can reproduce with 1.6.0 through 1.8.0b1)

on the "rootless" tree (second tree in the test) right-click or option-click on a node. The context menu appears, but in FF there is still no selection on the Tree. In Chrome, the selection is set and the context menu appears.

Change History (3)

comment:1 Changed 10 years ago by bill

Summary: right-click in tree does not select on FFTree: right-click in tree does not select on FF

The issues are:

  • Consistency (FF and Chrome should match each other, but not sure which behavior is right)
  • The menu code needs some way to know which TreeNode was right clicked. Need to investigate whether that's via selection or some other way.

comment:2 Changed 10 years ago by bill

Resolution: invalid
Status: newclosed

The Tree is designed to only select on left-click. See the code in _dndSelector.js:

onMouseDown: function(e){
        // ignore right-click
        if(e.type != "touchstart" && !mouse.isLeft(e)){ return; }

I tried right-click on both Chrome/Mac and Chrome/Windows, and it doesn't select the node.

Presumably what you were doing was a ctrl-click on a mac, which strangely gets reported in Chrome as a left-click with the ctrl-key, rather than a faux right-click event. It seems like that's a bug in webkit, don't you think? (Note that Safari behaves the same way.) If so, I guess you should file a ticket with webkit.

If not, then it's probably something that dojo/mouse::isLeft() should be accounting for. Alternately you could argue that every client of dojo/mouse::isLeft() should also be checking for the control key.

In any case, I'm going to close this ticket. If you want you should open a ticket either against dojo/mouse (in this bug database) or against Chrome itself.

comment:3 Changed 10 years ago by bill

PS: We can't just treat any ctrl-left-click as a right-click, because ctrl-left-click already has another meaning: add this node to the set of selected nodes.

Last edited 10 years ago by bill (previous) (diff)
Note: See TracTickets for help on using tickets.