Skip to content
This repository has been archived by the owner on May 21, 2021. It is now read-only.

Commit

Permalink
fix(adjust-height): hide dropdown menu until adjust-height finished t…
Browse files Browse the repository at this point in the history
…o avoid flicker
  • Loading branch information
Philipp Burgmer committed May 29, 2014
1 parent fa1536b commit fcd7382
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/w11k-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ angular.module('w11k.select').directive('w11kSelect', [
content.style.maxHeight = '';
}

var jqDropDownMenu = angular.element(element[0].querySelector('.dropdown-menu'));
var domDropDownContent = element[0].querySelector('.dropdown-menu .content');
var domHeightAdjustContainer = getParent(element, '.w11k-select-adjust-height-to');

Expand All @@ -220,8 +221,10 @@ angular.module('w11k.select').directive('w11kSelect', [

$document.on('keyup', onEscPressed);

jqDropDownMenu.css('visibility', 'hidden');
$timeout(function () {
adjustHeight();
jqDropDownMenu.css('visibility', 'visible');
});
jqWindow.on('resize', adjustHeight);
},
Expand Down

0 comments on commit fcd7382

Please sign in to comment.