aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dijit/tests/test_Dialog_focusDestroy.html
diff options
context:
space:
mode:
Diffstat (limited to 'includes/js/dijit/tests/test_Dialog_focusDestroy.html')
-rw-r--r--includes/js/dijit/tests/test_Dialog_focusDestroy.html61
1 files changed, 61 insertions, 0 deletions
diff --git a/includes/js/dijit/tests/test_Dialog_focusDestroy.html b/includes/js/dijit/tests/test_Dialog_focusDestroy.html
new file mode 100644
index 0000000..187a5d4
--- /dev/null
+++ b/includes/js/dijit/tests/test_Dialog_focusDestroy.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <title>Dialog Widget Dojo Tests</title>
+
+ <style type="text/css">
+ @import "../../dojo/resources/dojo.css";
+ @import "css/dijitTests.css";
+
+ body { font-family : sans-serif; }
+ form { margin-bottom : 0; }
+ table { border: none; }
+ #dialog3_underlay { background-color: #027 }
+ </style>
+
+ <script type="text/javascript"
+ djConfig="parseOnLoad: true, isDebug: true"
+ src="../../dojo/dojo.js"></script>
+ <script type="text/javascript" src="_testCommon.js"></script>
+
+ <script type="text/javascript">
+ dojo.require("dijit.Dialog");
+ dojo.require("dijit.form.Button");
+
+ // make dojo.toJson() print dates correctly (this feels a bit dirty)
+ function createAndShow() {
+ var node = document.createElement("div");
+ dojo.body().appendChild(node);
+ var dlg = new dijit.Dialog({ title: "test input focus" }, node);
+
+ var input = document.createElement("input");
+ dojo.attr(input,"tabIndex","0");
+ dlg.containerNode.appendChild(input);
+
+ var btn = new dijit.form.Button({ label: "Close" });
+ dlg.containerNode.appendChild(btn.domNode);
+
+ dojo.connect(btn, "onClick", function(){
+ console.log("destroying, while visible");
+ dlg.destroy();
+
+ });
+ dlg.show();
+ }
+ </script>
+</head>
+<body>
+<h1 class="testTitle">Dijit layout.Dialog tests</h1>
+
+<p>If you input this box, you can type. You should be able to type and use backspace/etc
+when you destroy the visible dialog. refs <a href="http://trac.dojotoolkit.org/ticket/5351">#5351</a>
+</p>
+
+<input id="testInput" name="foo" value="bar" />
+
+<button dojoType="dijit.form.Button" onclick="createAndShow()">Show Dialog</button>
+
+</body>
+</html>
+