Opened 7 years ago

Closed 7 years ago

Last modified 7 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:

Description

(can reproduce with 1.6.0 through 1.8.0b1)

http://download.dojotoolkit.org/release-1.6.0/dojo-release-1.6.0/dijit/tests/tree/test_Tree.html

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 7 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 7 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 7 years ago by bill

PS: It's possible the app may actually want to detect a real left-click from a real mouse with the control key pressed. I guess we don't see that much nowadays, although funky bindings like that were popular 20 years ago, in the days of X. So it would really be better if only ctrl-trackpad-click was reported as a right click.

Version 0, edited 7 years ago by bill (next)
Note: See TracTickets for help on using tickets.