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

Commit 45e92ea

Browse files
Splaktarmmalerba
authored andcommitted
fix(datepicker): does not open on focus in Firefox (#11521)
Fixes #10619
1 parent 8aa5d58 commit 45e92ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/datepicker/js/datepickerDirective.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -820,14 +820,14 @@
820820
this.evalAttr('ngFocus');
821821

822822
// Attach click listener inside of a timeout because, if this open call was triggered by a
823-
// click, we don't want it to be immediately propogated up to the body and handled.
823+
// click, we don't want it to be immediately propagated up to the body and handled.
824824
var self = this;
825-
this.$mdUtil.nextTick(function() {
825+
this.$timeout(function() {
826826
// Use 'touchstart` in addition to click in order to work on iOS Safari, where click
827827
// events aren't propagated under most circumstances.
828828
// See http://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
829829
self.documentElement.on('click touchstart', self.bodyClickHandler);
830-
}, false);
830+
}, 100);
831831

832832
window.addEventListener(this.windowEventName, this.windowEventHandler);
833833
}

0 commit comments

Comments
 (0)