Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 9b2f7ac

Browse files
committed
fix(datepicker): ensure the original target is not in popup
- Ensure that the original event target is not a child of the popup element to avoid edge case where the datepicker closes on any click Closes #4316 Fixes #4314
1 parent 3b35349 commit 9b2f7ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/datepicker/datepicker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ function($compile, $parse, $document, $rootScope, $position, dateFilter, datePar
715715
});
716716

717717
var documentClickBind = function(event) {
718-
if (scope.isOpen && !element[0].contains(event.target)) {
718+
if (scope.isOpen && !(element[0].contains(event.target) || popupEl[0].contains(event.target))) {
719719
scope.$apply(function() {
720720
scope.isOpen = false;
721721
});

0 commit comments

Comments
 (0)