From 82f350da416cbbab32c1022dd7bfea9c9e10ba82 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 6 Aug 2014 16:37:06 +0300 Subject: Highlight selection/deselection Nodes can be deselected by clicking background Clicking in the new sentence bubble will deselect the previous nodes --- scripts/textanalysis.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'scripts/textanalysis.js') diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js index 3b97ee71..cde4c937 100644 --- a/scripts/textanalysis.js +++ b/scripts/textanalysis.js @@ -29,9 +29,16 @@ $("#textanalyser").keypress(function(e) { }else{ suggestionChange=false; } - + return false; } + + + if (e.which == 9) {//TAB + text = $('#textanalyser').val(); + $('#textanalyser').val(text+" "); + return false; + } }); $(document).keydown(function(e) { @@ -51,11 +58,8 @@ $(document).keydown(function(e) { if (e.keyCode == 40) {//DOWN suggestionChange=true; } - if (e.keyCode == 9) {//TAB - text = $('#textanalyser').val(); - $('#textanalyser').val(text+" "); return false; } -- cgit v1.3.1