Permalink
Browse files

core: doesnt hide menu if it's visible

  • Loading branch information...
1 parent 9a8f62f commit 5f3a8c5056f84036b1555b40809bc14c2a386895 @retrofox retrofox committed Feb 13, 2014
Showing with 7 additions and 3 deletions.
  1. +7 −3 index.js
View
@@ -205,12 +205,16 @@ Dropdown.prototype.empty = function(){
Dropdown.prototype.dims = function(){
var el = dom(this.menu);
- el.css('visibility', 'hidden');
- el.css('display', 'block');
+ var prev = el.css('display');
+
+ if ('none' == prev) {
+ el.css('visibility', 'hidden');
+ el.css('display', 'block');
+ }
var s = el[0].getBoundingClientRect();
- el.css('display', 'none');
+ el.css('display', prev);
el.css('visibility', 'visible');
return s;
};

0 comments on commit 5f3a8c5

Please sign in to comment.