+ $input.focus(reload_suggestions_box);
+
+ $editor.change(function() {
+ if ($editor.html().length > 10) {
+ close_suggestions_box();
+ }
+ });
+
+
+
+ // for chrome
+ $input.keydown(focus_on_question);
+ function focus_on_question(e) {
+ var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
+
+ if(e.keyCode == 9 && is_chrome) {
+ $('#editor')[0].focus();
+ }
+ }