From b77e606261c821883476aed2b856a594a642ecae Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 27 Oct 2014 12:58:25 -0700 Subject: Dingus: Make tab insert a tab in the text box. instead of moving you to the next field. --- dingus.html | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dingus.html') 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(''); -- cgit v1.2.3