var currentSideBar = 'div#title_side_bar';
function changeSideBar(enabled_bar) {
- $(currentSideBar).hide();
- currentSideBar = enabled_bar;
- $(currentSideBar).fadeIn('slow');
+ if (enabled_bar != currentSideBar) {
+ $(currentSideBar).hide();
+ currentSideBar = enabled_bar;
+ $(currentSideBar).fadeIn('slow');
+ }
}
var $input = $('#id_title');
var $box = $('#ask-related-questions');
var template = $('#question-summary-template').html();
+ var $editor = $('#editor');
var results_cache = {};
$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);