Opened 8 years ago
Closed 8 years ago
#17318 closed defect (wontfix)
dijit/Menu does not work with dijit/Editor
Reported by: | George Sexton | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dijit | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
If you use a digit/Menu and specify targetNodeIds that should link it to a defined dijit/Editor, it doesn't work.
I've created a test case page that demonstrates this:
http://www.mhsoftware.com/EditorTestCase.html
Steps to Reproduce Load the test case page. Right click on the two form elements, and then right click on the digit/Editor text entry area.
Observed Behavior
Right clicking on the two form elements works, but right clicking on the editor does not work.
Expected Behavior
Right clicking on the digit/Editor should activate the context menu.
Other Comments
I've noticed that if you have an invalid targetNodeId in dijit/Menu, it stops parsing of the page. That's not very robust.
I've tested the issue with Firefox 22, Safari, and IE 10. The behavior is the same on all platforms.
Attachments (2)
Change History (4)
Changed 8 years ago by
Attachment: | EditorTestCase.html added |
---|
comment:1 Changed 8 years ago by
Component: | General → Dijit |
---|---|
Owner: | set to bill |
OK, thanks for the test case. It's not really feasible to make your test case work as is, but I'll tell you how to workaround the problem. You need to explicitly create the menu on the Editor's iframe. That's complicated because the Editor initializes asynchronously, but the code is basically:
require(["dojo/parser", "dijit/Editor", "dijit/Menu", "dijit/MenuItem", "dojo/domReady!"], function(parser){ parser.parse(); IDDijitEditor.onLoadDeferred.then(function(){ itemContextMenu.bindDomNode('IDDijitEditor_iframe'); }); })
I'll attach a modified version of your test case that works.
comment:2 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Test case page that demonstrates the issue.