Opened 10 years ago

Closed 10 years ago

#9215 closed defect (fixed)

dijit.Dialog blocks keypress for dijit.TooltipDialog inside of them

Reported by: Andy Owned by:
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:

Description

I have a dijit.Editor with createLink and insertImage plugin inside of a dijit.Dialog. When I try to type in a URL or a description for a Link or Image no characters are typed. I can only copy&paste some text in the textbox. I searched for the reason and found out that the dijit.Dialog:_onKey function blocks all key events with "dojo.stopEvent(evt);" if the event.target is not inside die domNode of the dialog. Because the createLink and insertImage plugins are dijit.TooltipDialogs? they are outside of the domNode of the dialog. So all keypress events are blocked and the dijit.TooltipDialog?'s textbox receive no characters. When I comment "dojo.stopEvent(evt);" out this problem is solved.

Example code: dojo.require("dijit.Dialog"); dojo.require("dijit.Editor"); dojo.require("dijit._editor.plugins.LinkDialog?"); var dialog = new dijit.Dialog ({id: "dialog", title: "Title"}, dojo.create("div")); var editor = new dijit.Editor ({id:"editor", name:"editor", plugins:["createLink","insertImage"]}); dialog.domNode.appendChild(editor.domNode); dialog.show();

Change History (2)

comment:1 Changed 10 years ago by Andy

So I think the bugfix should be:

Change "dojo.stopEvent(evt);" to "if(evt.type != "keypress") dojo.stopEvent(evt);"

comment:2 Changed 10 years ago by bill

Milestone: tbd1.4
Resolution: fixed
Status: newclosed

This is broken in 1.3, but working in trunk.

Note: See TracTickets for help on using tickets.