1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <title>Dialog Widget Dojo Tests</title>
7 <style type="text/css">
8 @import "../../dojo/resources/dojo.css";
9 @import "css/dijitTests.css";
11 body { font-family : sans-serif; }
12 form { margin-bottom : 0; }
13 table { border: none; }
14 #dialog3_underlay { background-color: #027 }
17 <script type="text/javascript"
18 djConfig="parseOnLoad: true, isDebug: true"
19 src="../../dojo/dojo.js"></script>
20 <script type="text/javascript" src="_testCommon.js"></script>
22 <script type="text/javascript">
23 dojo.require("dijit.Dialog");
24 dojo.require("dijit.form.Button");
26 // make dojo.toJson() print dates correctly (this feels a bit dirty)
27 function createAndShow() {
28 var node = document.createElement("div");
29 dojo.body().appendChild(node);
30 var dlg = new dijit.Dialog({ title: "test input focus" }, node);
32 var input = document.createElement("input");
33 dojo.attr(input,"tabIndex","0");
34 dlg.containerNode.appendChild(input);
36 var btn = new dijit.form.Button({ label: "Close" });
37 dlg.containerNode.appendChild(btn.domNode);
39 dojo.connect(btn, "onClick", function(){
40 console.log("destroying, while visible");
49 <h1 class="testTitle">Dijit layout.Dialog tests</h1>
51 <p>If you input this box, you can type. You should be able to type and use backspace/etc
52 when you destroy the visible dialog. refs <a href="http://trac.dojotoolkit.org/ticket/5351">#5351</a>
55 <input id="testInput" name="foo" value="bar" />
57 <button dojoType="dijit.form.Button" onclick="createAndShow()">Show Dialog</button>