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. --- lib/jquery-ui.js | 2 +- scripts/textanalysis.ui.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/jquery-ui.js b/lib/jquery-ui.js index ce8731b0..688355fb 100644 --- a/lib/jquery-ui.js +++ b/lib/jquery-ui.js @@ -16579,4 +16579,4 @@ var tooltip = $.widget( "ui.tooltip", { -})); \ No newline at end of file +})); 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