Opened 8 years ago

Closed 7 years ago

#14171 closed defect (patchwelcome)

dijit.Menu with leftClickToOpen does not open on a grid

Reported by: jlmagc Owned by: Evan
Priority: blocker Milestone: tbd
Component: DojoX Grid Version: 1.6.1
Keywords: EnhancedGrid menu leftClickToOpen Cc:
Blocked By: Blocking:

Description

dijit.Menu has an option called leftClickToOpen that enables it to be opened upon a left click, instead of upon a right click. When used as a rowMenu on a EnhancedGrid?, it works fine with Dojo 1.5.1, but it does not work when using a later version (so far I've tried 1.6.1 and 1.7.0)

Attachments (2)

test-grid-with left-click-menu-1.6.1.html (3.3 KB) - added by jlmagc 8 years ago.
test-grid-with left-click-menu-1.5.1.html (3.4 KB) - added by jlmagc 8 years ago.

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by jlmagc

Changed 8 years ago by jlmagc

comment:1 Changed 8 years ago by jlmagc

Well, after some research, the problem started on http://bugs.dojotoolkit.org/changeset/23810/dojo/dojox/trunk/grid/enhanced/plugins/Menu.js. Part of the change overwrites the method _scheduleOpen on the Menu with a function that does nothing:

@@ -38,5 +38,10 @@
 		var g = this.grid;
 		if(!g[menuType]){//in case already created in _Grid.postCreate()
-			g.set(menuType, this._getMenuWidget(menu));
+			var m = this._getMenuWidget(menu);
+			if(!m){return;}
+			g.set(menuType, m);
+			if(menuType != "headerMenu"){
+				m._scheduleOpen = function(){return;};
+			}
 		}
 	},

That causes that the scheduleOpen of the menu does not work, and as a consequence the menu is not shown. I don't know exactly the implications, but it seems that the condition should be changed to

if(menuType != "headerMenu" && !menu.leftClickToOpen){

Avoiding this issue. It works for me, but somebody with more experiencia should take a deeper look to this issue.

comment:2 Changed 8 years ago by bill

Component: DijitDojoX Grid
Owner: set to Evan

comment:3 Changed 8 years ago by Colin Snover

Priority: highblocker

Bulk update of open ticket priorities.

comment:4 Changed 7 years ago by bill

DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.

You should upgrade your code to use one of those two grids.

We will consider patches to the old DojoX Grid code though.

comment:5 Changed 7 years ago by bill

Resolution: patchwelcome
Status: newclosed
Note: See TracTickets for help on using tickets.