Commits

fab31 committed f263e8e

improved selection focus handling

  • Participants
  • Parent commits 9b0688f

Comments (0)

Files changed (1)

File drink/static/base.js

 
 		if (!!me.cur_action && me.cur_action !== action_to_take) {
 	        $('#main_body , #footers').fadeOut();
-	        ui.focus.clear();
+            ui.focus.clear({no_focus: true});
         }
 		if ( obj || action_to_take !== me.cur_action)
 			setTimeout(function() {
 					} else {
 						if(debug) console.log('No hook!')
 					}
+                    ui.focus.clear();
 					setTimeout(function() {dom_initialize($('#main_body'));}, 500);
 			    })
 		        .error(function(data, code) {
         }
         return l;
     };
-    this.clear = function() {
+    this.clear = function(opts) {
         var i = this.selected_item();
         i.removeClass(this.selection_class);
         this.current_list_pos = 0;
         this.current_list = this.lists[0];
         this.position = -1;
-        this.highlight( this._select()[0] );
+
+        if (opts.no_focus !== true)
+            this.highlight( this._select()[0] );
     };
     this.selected_link = function() {
         var m = this.selected_item();