summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-10-27 12:58:25 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-10-27 12:58:25 -0700
commitb77e606261c821883476aed2b856a594a642ecae (patch)
tree1fe67cfa3d092c5925b275fa09d671436615c32b
parentcc7788cf62999d317626301960f83d42219acb7e (diff)
Dingus: Make tab insert a tab in the text box.
instead of moving you to the next field.
-rw-r--r--dingus.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/dingus.html b/dingus.html
index 7c3a7c7..373db8f 100644
--- a/dingus.html
+++ b/dingus.html
@@ -70,6 +70,12 @@ $(document).ready(function() {
// show HTML tab if text is from query
$('#result-tabs a[href="#result"]').tab('show');
}
+ // make tab insert a tab in the text box:
+ $("#text").addEventListener('keydown', function (e) {
+ if (e.which == 9) {
+ e.preventDefault();
+ }
+ });
parseAndRender();
$("#clear-text-box").click(function(e) {
$("#text").val('');