Opened 9 years ago
Closed 9 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 )
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)
Change History (17)
comment:1 Changed 9 years ago by
Owner: | changed from bill to dtamm |
---|---|
Status: | new → pending |
comment:2 Changed 9 years ago by
Status: | pending → new |
---|
Okay, i will create the HTML file tomorrow, when i am back in my office! Thanks for first!
comment:3 Changed 9 years ago by
Description: | modified (diff) |
---|---|
Status: | new → pending |
Summary: | dijit.Menue not displaying correctly in dijit.Dialog with dojox.grid.EnhancedGrid → dijit.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 9 years ago by
Attachment: | Testcase.html added |
---|
Thats my testcase, just testet this in Firefox 18 and it shows the problem.
comment:4 Changed 9 years ago by
Status: | pending → new |
---|
Attachment (Testcase.html) added by ticket reporter.
comment:5 Changed 9 years ago by
Status: | new → pending |
---|
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
comment:6 Changed 9 years ago by
Status: | pending → new |
---|
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.
comment:7 Changed 9 years ago by
Status: | new → pending |
---|
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 9 years ago by
Attachment: | Testcase.3.html added |
---|
New Testcase with declarative queryreadstore
comment:8 Changed 9 years ago by
Status: | pending → new |
---|
Attachment (Testcase.3.html) added by ticket reporter.
comment:9 Changed 9 years ago by
Status: | new → pending |
---|
OK... that test case works fine for me, I can see the context menu on the table in the dialog.
comment:10 Changed 9 years ago by
Status: | pending → new |
---|
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...
comment:11 Changed 9 years ago by
Status: | new → pending |
---|
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 9 years ago by
Status: | pending → new |
---|
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 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
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!