dgrid icon indicating copy to clipboard operation
dgrid copied to clipboard

With DnD Extension and dijit/Menu, IE10/11 click on a dgrid does not dismiss menu

Open frankf2 opened this issue 9 years ago • 1 comments

dojo 1.10.4, dgrid 0.4

A dijit menu displayed in/over a dgrid is not dismissed when that or another dgrid's row is mouse clicked and the clicked row is in a dgrid that uses the DnD Extension. FF, Chrome, and Safari do dismiss the dijit menu.

This was reproduced by modifying dgrid/test/OnDemand.html.

Modify define (and function params: ", Menu, MenuItem, DnD") to include:

"dijit/Menu",
"dijit/MenuItem",
"dgrid/extensions/DnD",

Modify the StandardGrid (dgrid) to include the DnD Extension (this affects all dgrids on the page):

var StandardGrid = declare([Grid, Selection, Keyboard, Editor, DnD]);

Add the dijit menu to the top dgrid:

var menu = new Menu({targetNodeIds: [grid.domNode]});
menu.onBlur = function(e) {
                console.log("menu blur");
};
menu.addChild(new MenuItem({label: "One"}));
menu.addChild(new MenuItem({label: "Two"}));
menu.startup();

Operation:

  • Right click on the top dgrid to display the menu.
  • Click on a row of that or another dgrid (all are using the DnD Extension).
  • In IE10/11, the menu is not dismissed, but is dismissed in other browsers.

Note: Updated for Clarification. The menu will not be dismissed when the click is on a row of a dgrid that uses the DnD Extension. The assumption is that the dgrid with DnD Extension is consuming the focus/blur events. Clicking on a row in a dgrid that does not use the DnD Extension does dismiss the menu.

frankf2 avatar Apr 20 '15 13:04 frankf2

My guess is https://github.com/SitePen/dgrid/issues/1067 is related to this issue. Fixing the correct focus on mousedown should fix all these issues.

kruthikavenkatathri avatar Oct 21 '15 20:10 kruthikavenkatathri