Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(select): fix options not closing with explicit md-select-label
Browse files Browse the repository at this point in the history
closes #4387
  • Loading branch information
rschmukler committed Sep 15, 2015
1 parent bda85e2 commit 3c0d21e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/select/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -1124,12 +1124,12 @@ function SelectProvider($$interimElementProvider) {
*/
function mouseOnScrollbar() {
var clickOnScrollbar = false;
if(ev && (ev.currentTarget.children.length > 0)) {
if (ev && (ev.currentTarget.children.length > 0)) {
var child = ev.currentTarget.children[0];
var hasScrollbar = child.scrollHeight > child.clientHeight;
if (hasScrollbar && child.children.length > 0) {
var relPosX = ev.pageX - ev.currentTarget.getBoundingClientRect().left;
if(relPosX > child.children[0].offsetWidth)
if (relPosX > child.querySelector('md-option').offsetWidth)
clickOnScrollbar = true;
}
}
Expand Down

0 comments on commit 3c0d21e

Please sign in to comment.