Opened 13 years ago
Closed 13 years ago
#5567 closed defect (worksforme)
_openMyself function in dijit.Menu should use evt.srcElement instead of evt.target for IE
Reported by: | guest | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Dijit | Version: | 1.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
dijit.Menu._openMyself contains code like the following:
if(dojo.isSafari || this._contextMenuWithMouse){ x=e.pageX; y=e.pageY; }else{ // otherwise open near e.target var coords = dojo.coords(e.target, true); x = coords.x + 10; y = coords.y + 10; } ... dijit.popup.open({ popup: this, x: x, y: y, onExecute: closeAndRestoreFocus, onCancel: closeAndRestoreFocus, orient: this.isLeftToRight() ? 'L' : 'R' });
Unfortunately, e.target does not work on IE and you get an error. If you add an additional check like this it works fine and the popup appears:
else if (dojo.IE) { // otherwise open near e.target var coords = dojo.coords(e.srcElement, true); x = coords.x + 10; y = coords.y + 10; }
This code is covered under ATG's CCLA you have on file.
Change History (2)
comment:1 Changed 13 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Closing since no response. It's working for me.
Note: See
TracTickets for help on using
tickets.
I just tried http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/test_Menu.html on IE6 and it's working fine for me. What problem are you seeing? Note that dojo does event normalization so that branching like this in client code (like dijit) shouldn't be necessary.