diff options
| author | Alon Levy <alon@pobox.com> | 2014-11-03 17:13:23 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-11-03 17:13:23 +0200 |
| commit | de5ce9e401ff5d36e09228effd16d502f5a4a76a (patch) | |
| tree | 1a02df2bab4e7dbda9800009f998ebfd51f8cb9a /scripts | |
| parent | 574522727c2659cec5f681c6a72f5a001f6532c6 (diff) | |
Fixes #121 - Large part of map unclickable due to autocomplete suggestions
See
http://stackoverflow.com/questions/5643767/jquery-ui-autocomplete-width-not-set-correctly/11845718#11845718
A relevant bug on jquery-ui for width:
http://bugs.jqueryui.com/ticket/7303
Additionally I considered measuring the exact width before noticing I
can set the width to 10px and the text itself is perfectly clickable,
see:
http://stackoverflow.com/questions/6961022/measure-bounding-box-of-text-node-in-javascript
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/textanalysis.ui.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/textanalysis.ui.js b/scripts/textanalysis.ui.js index 2eadff0b..0bd06cbf 100644 --- a/scripts/textanalysis.ui.js +++ b/scripts/textanalysis.ui.js @@ -74,7 +74,10 @@ return { element.autocompleteTrigger({ triggerStart: '#', triggerEnd: '', - source: textanalysis.autocompleteCallback + source: textanalysis.autocompleteCallback, + open: function() { + $('.ui-autocomplete').css('width', '10px'); + } }); $(document).keydown(function(e) { |
