Skip to content

Commit

Permalink
Fix native opening on iOS 9.2. Closes #41
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbloom committed Jan 11, 2016
1 parent e75c745 commit 3d47679
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/js/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,9 @@ class Select extends Evented {
addClass(this.target, 'select-open');

if (this.useNative()) {
this.select.style.display = 'block';

setTimeout(() => {
let event = document.createEvent("MouseEvents");
event.initEvent("mousedown", true, true);
this.select.dispatchEvent(event);
});
let event = document.createEvent("MouseEvents");
event.initEvent("mousedown", true, true);
this.select.dispatchEvent(event);

return;
}
Expand Down Expand Up @@ -284,8 +280,7 @@ class Select extends Evented {
removeClass(this.target, 'select-open');

if (this.useNative()) {
this.select.style.display = 'none';
return;
this.select.blur();
}

this.tether.disable();
Expand Down

0 comments on commit 3d47679

Please sign in to comment.