]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/media/js/osqa.ask.js
Reintegrate merge cacheimp -> trunk.
[osqa.git] / forum / skins / default / media / js / osqa.ask.js
index 4bf05be01866dac100ff7726742f3711172c5636..fab1c0af92778afdf54da5159a39f1047e0411d1 100644 (file)
@@ -19,6 +19,7 @@ $(function() {
     var $input = $('#id_title');
     var $box = $('#ask-related-questions');
     var template = $('#question-summary-template').html();
+    var $editor = $('#editor');
 
     var results_cache = {};
 
@@ -80,7 +81,14 @@ $(function() {
 
     $input.keyup(reload_suggestions_box);
     $input.focus(reload_suggestions_box);
-    $input.blur(close_suggestions_box);
+
+    $editor.change(function() {
+        if ($editor.html().length > 10) {
+            close_suggestions_box();
+        }
+    });
+
+
 
     // for chrome
     $input.keydown(focus_on_question);