Opened 6 years ago

Closed 6 years ago

#16571 closed defect (duplicate)

dijit.Menu not displaying correctly in dijit.Dialog with dojox.grid.EnhancedGrid

Reported by: dtamm Owned by: dtamm
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

An dijit.Menu seems to be not displayed correctly within an dijit.Dialog with an dojox.grid.EnhancedGrid?.

My declarative dijit.Menu within the dijit.Dialog:

<div dojoType="dijit.Menu" id="menueForGrid" style="width: auto; display: none;">[[BR]]
    <div dojoType="dijit.MenuItem" iconClass="editIcon" onClick="edit(item.id);">Edit</div>[[BR]]
    <div dojoType="dijit.MenuItem" iconClass="deleteIcon" onClick="delede(item.id);">Delete</div>[[BR]]
</div>

while the menu will be called from the grid this way:

<script type="dojo/connect" event="onRowContextMenu" args="evt">
    var item = dijit.byId('gridId').getItem(evt.rowIndex).i;
    dijit.byId('menueForGrid')._openMyself(evt);
</script>

This is the way it works outside of any dialog (e.g. an ContentPane of an TabContainer)! I had that one here for a couple of months now, and it worked till 1.8.1 (i guess, then i upgraded to 1.8.3). Now the dijit.MenuItem(s) will show up once, but if i want to choose one (i put the mouse pointer on the specific item) all items disappear. Afterwards no right click on the grid item (with an opening menu) is available anymore.

Attachments (4)

Testcase.html (3.9 KB) - added by dtamm 6 years ago.
Thats my testcase, just testet this in Firefox 18 and it shows the problem.
Testcase.2.html (3.9 KB) - added by bill 6 years ago.
corrected version of test case
Testcase.3.html (4.0 KB) - added by dtamm 6 years ago.
New Testcase with declarative queryreadstore
data.json (160 bytes) - added by dtamm 6 years ago.
data for Testcase.3.html

Download all attachments as: .zip

Change History (17)

comment:1 Changed 6 years ago by bill

Owner: changed from bill to dtamm
Status: newpending

Please attach a test case using the "attach file" button. It should be as small as possible to still reproduce the problem, almost always a single HTML file that we can load in the browser (i.e. not PHP, JSP, etc.). And, see if the problem only happens with Grid, or on any item within a Dialog.

Then, give exact instructions on how to reproduce the problem using your attached test file.

The test case is necessary both to confirm that there's a bug, and for us to be able to debug the problem.

Thanks!

comment:2 Changed 6 years ago by dtamm

Status: pendingnew

Okay, i will create the HTML file tomorrow, when i am back in my office! Thanks for first!

comment:3 Changed 6 years ago by bill

Description: modified (diff)
Status: newpending
Summary: dijit.Menue not displaying correctly in dijit.Dialog with dojox.grid.EnhancedGriddijit.Menu not displaying correctly in dijit.Dialog with dojox.grid.EnhancedGrid

OK, write a comment back here after you've attached a test case.

Changed 6 years ago by dtamm

Attachment: Testcase.html added

Thats my testcase, just testet this in Firefox 18 and it shows the problem.

comment:4 Changed 6 years ago by dtamm

Status: pendingnew

Attachment (Testcase.html) added by ticket reporter.

comment:5 Changed 6 years ago by bill

Status: newpending

OK, thanks for the test case. Well, one issue is that your

<script type="text/javascript" src="dijit/dijit.js"></script>

doesn't work with modern dojo, at least not without a build. I'm not an expert on the loader but on my system it made dijit.Dialog become an Object rather than a Function.

Another issue is that your new dojo.data.ItemFileReadStore call is not inside a dojo.ready() etc., so ItemFileReadStore hasn't finished loading. Your results may vary since this is a race condition.

After fixing both those problems, on trunk I get an error about cellFunc not being the right type, but it does work for me on 1.8. Tested on FF18 mac, FF17 / win7, and FF18 / win7

Last edited 6 years ago by bill (previous) (diff)

Changed 6 years ago by bill

Attachment: Testcase.2.html added

corrected version of test case

comment:6 Changed 6 years ago by dtamm

Status: pendingnew

Hmpf, for my testcase, it really works indeed, thx for that, but: as you said, i should submit a testcase (and for the best case: in one single file), i created a html file with all the stuff in it.

In my actual application, i am usind the EnhancedGrid? with a declarative ItemFileReadstore?. Does this make any difference? If you wish, i would submit a testcase (containing 2 files, one html and one json file, as in my actual application), just ring me up then. (sorry for the late answer, i was out of office for some time, due to holidays...)

Last edited 6 years ago by dtamm (previous) (diff)

comment:7 Changed 6 years ago by bill

Status: newpending

I don't know what makes a difference or doesn't since I can't reproduce your problem. But a test case with two files (HTML and JSON) is fine. I'll wait for you to attach that.

Changed 6 years ago by dtamm

Attachment: Testcase.3.html added

New Testcase with declarative queryreadstore

comment:8 Changed 6 years ago by dtamm

Status: pendingnew

Attachment (Testcase.3.html) added by ticket reporter.

Changed 6 years ago by dtamm

Attachment: data.json added

data for Testcase.3.html

comment:9 Changed 6 years ago by bill

Status: newpending

OK... that test case works fine for me, I can see the context menu on the table in the dialog.

comment:10 Changed 6 years ago by dtamm

Status: pendingnew

Even in the Dialog Grid? I havent seen it on my FF18 (WinXP SP2)... strange behavior!

Edit: Okay when you right click on one row, the context menu will show up, correct. But the moment my mouse pointer will go onto the first element of the context menu, the hole menu dissapears and will never be shown again! Even if i right click the row again, not a single MenuItem? is shown...

Last edited 6 years ago by dtamm (previous) (diff)

comment:11 Changed 6 years ago by bill

Status: newpending

Oh I think you are hitting the _onBlur() code in Dialog that I added for 1.8.2 but rolled back for 1.8.4. Does http://bill.dojotoolkit.org/trunk/Testcase.3 work correctly for you?

comment:12 Changed 6 years ago by dtamm

Status: pendingnew

Not really, getting several Errors from the dojo.js, seems that the Update of your Repository from your svn/git had some conflicts, at least my Firebug shows me some Error containing "<<<<<<< .mine" (according to firebug it is in dojo.js, Line 332). Not showing any dojo Element at all. Tested on FF18 and Chrome 23 on WinXP SP2 and MacOSX 10.7.

comment:13 Changed 6 years ago by bill

Resolution: duplicate
Status: newclosed

Duplicate of #16550.
I don't understand what you mean by "your Repository from your svn/git", or why you are getting merge errors, but regardless, I'm sure that you are seeing #16550.

Note: See TracTickets for help on using tickets.