I'm trying to launch a dialog from a dialog. On the second dialog with a textbox, I'm having problems with keypresses. Under IE7, I can't type in that textbox at all, while in FF2, I can type, but can not hit back space. This seems to be new in dojo 1.1.x. This was working in previous versions of dojo.
Is there a trac log for this? Is there a current work around?
Here is an example with the issue:
<html>
<head>
<style type="text/css">
/* <![CDATA[ */
@import url("http://o.aolcdn.com/dojo/1.1.1/dojo/resources/dojo.css");
@import url("http://o.aolcdn.com/dojo/1.1.1/dijit/themes/tundra/tundra.css");
/* ]]> */
</style>
<script type="text/javascript">
// <![CDATA[
djConfig = { isDebug: false, parseOnLoad: true };
// ]]>
</script>
<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.1.1/dojo/dojo.xd.js"></script>
<script type="text/javascript">
// <![CDATA[
dojo.require("dojo.parser");
dojo.require("dijit.form.Button");
dojo.require("dijit.form.Form");
dojo.require("dijit.form.ValidationTextBox");
dojo.require("dijit.Dialog");
function openDialog1() {
dijit.byId("test1").show();
}
function openDialog2() {
dijit.byId("test2").show();
}
dojo.addOnLoad(function() {
var foo1 = new dijit.Dialog({ title: "test1 dialog" },dojo.byId("test1"));
foo1.startup();
var foo2 = new dijit.Dialog({ title: "test2 dialog" },dojo.byId("test2"));
foo2.startup();
});
// ]]>
</script>
<title>dialog test</title>
</head>
<body class="tundra">
<td id="dialogButtonCell"><button id="dialogButton" dojoType="dijit.form.Button" type="button" onClick="openDialog1();">Open Dialog</button></td>
<div id="test1">test content 1 - press button to open another dialog
<input type="text" dojotype="dijit.form.ValidationTextBox" size="25" value="test1">
<button id="dialogButton1" dojoType="dijit.form.Button" type="button" onClick="openDialog2();">Dialog2</button>
</div>
<div id="test2">test content 2 - try typing, and backspacing in FF and IE.
<input type="text" dojotype="dijit.form.ValidationTextBox" size="25" value="test2">
</div>
</body>
</html>
Same here
I've encountered exactly the same problem. I can provide a little bit more debug info:
capturing the input.domNode onkeypress event with dojo.connect shows me, that key hits are received by the event. I get '8' for backspace and '46' for DEL keys. I have an if -clause for ENTER, and I launch something from there, which works fine (hitting ENTER actually causes the small dialog to close). I've tried returning void, true, or nothing at all from the event function, but nothing happens, when I press DEL or backspace.
Any ideas? Should I be connecting to the widgets onXXXX functions instead (what ever they are)?
Anni
There's a trac log for this
There's a trac log for this here:
http://trac.dojotoolkit.org/ticket/6759