From 3898c5acfb1fb2b4e94579ea6c8a88fc2250c00a Mon Sep 17 00:00:00 2001 From: Michael Prentice Date: Tue, 20 Nov 2018 21:00:18 -0500 Subject: [PATCH] fix(datepicker): does not open on focus in Firefox Fixes #10619 --- src/components/datepicker/js/datepickerDirective.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/datepicker/js/datepickerDirective.js b/src/components/datepicker/js/datepickerDirective.js index 9ec9772e8c..53cb41d631 100644 --- a/src/components/datepicker/js/datepickerDirective.js +++ b/src/components/datepicker/js/datepickerDirective.js @@ -802,14 +802,14 @@ this.evalAttr('ngFocus'); // Attach click listener inside of a timeout because, if this open call was triggered by a - // click, we don't want it to be immediately propogated up to the body and handled. + // click, we don't want it to be immediately propagated up to the body and handled. var self = this; - this.$mdUtil.nextTick(function() { + this.$timeout(function() { // Use 'touchstart` in addition to click in order to work on iOS Safari, where click // events aren't propagated under most circumstances. // See http://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html self.documentElement.on('click touchstart', self.bodyClickHandler); - }, false); + }, 100); window.addEventListener(this.windowEventName, this.windowEventHandler); }