From e855b0386ea0b49eece34ee06ef15311a2e7809d Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Wed, 12 Nov 2014 01:23:55 +0200 Subject: Fixes #87: hide autocomplete messages; see note TODO 1: Autocomplete is spamming the dom. This is a jqueryui bug, or actually by design - it's appending $('
')'s with message text to a span parent (no idea why span in particular) and they are never cleaned up. Similar code is used for accessability messages. --- scripts/textanalysis.ui.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/textanalysis.ui.js') diff --git a/scripts/textanalysis.ui.js b/scripts/textanalysis.ui.js index 394e65bc..0be87f64 100644 --- a/scripts/textanalysis.ui.js +++ b/scripts/textanalysis.ui.js @@ -28,6 +28,9 @@ function analyzeSentence(sentence, finalize) if (finalize || sentence.length == 0) { $('.typeselection').css('top', -300); $('.typeselection').css('left', 0); + $('span.ui-helper-hidden-accessible').hide(); + } else { + $('span.ui-helper-hidden-accessible').show(); } } @@ -82,7 +85,7 @@ return { source: textanalysis.autocompleteCallback, open: function() { $('.ui-autocomplete').css('width', '10px'); - } + }, }); $(document).keydown(function(e) { -- cgit v1.3.1