Skip to content

Commit 58de0d7

Browse files
committed
Use opacity, not visibility to hide element
Resolves angular-ui#1032 by hiding the element with opacity, not visibility. Elements with an opacity of 0 can still be focused.
1 parent 2d1422d commit 58de0d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/uiSelectDirective.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ uis.directive('uiSelect',
262262
}
263263

264264
// Hide the dropdown so there is no flicker until $timeout is done executing.
265-
dropdown[0].style.visibility = 'hidden';
265+
dropdown[0].style.opacity = 0;
266266

267267
// Delay positioning the dropdown until all choices have been added so its height is correct.
268268
$timeout(function(){
@@ -277,7 +277,7 @@ uis.directive('uiSelect',
277277
}
278278

279279
// Display the dropdown once it has been positioned.
280-
dropdown[0].style.visibility = '';
280+
dropdown[0].style.opacity = 1;
281281
});
282282
} else {
283283
if (dropdown === null) {

0 commit comments

Comments
 (0)