You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2019. It is now read-only.
I've got a strange scenario where clicking any of the buttons on the datepicker will close, which really isn't a problem unless you're trying to scroll through the months (or pick one explicitly). When this happens, the date picker doesn't actually trigger the cleanup method
I'm fairly confident it's something to do with my app / libraries, as I can't seem to replicate it on a clean project. However, I've been trying to debug why it's happening and am totally up a creek without a paddle.
One potential issue I came across while stepping through the events is that the documentClickBind function is being triggered and toggling the state, even if the event is inside the popup. It looks like line 718 is checking to see if the clicked element is inside the datepicker target, but in a popup's case it should probably also be a searching for a child of popupEl instead, correct?
Adjusting that line locally to the following fixes our issues, but I'm curious how this isn't also occurring in vanilla apps. Does the following make more sense as it's possible to click a custom element the popup that doesn't close the popup?
var documentClickBind = function(event) {
if (scope.isOpen && !(element[0].contains(event.target) || popupEl[0].contains(event.target))) {
scope.$apply(function() {
scope.isOpen = false;
});
}
};
I've got a strange scenario where clicking any of the buttons on the datepicker will close, which really isn't a problem unless you're trying to scroll through the months (or pick one explicitly). When this happens, the date picker doesn't actually trigger the cleanup method
I'm fairly confident it's something to do with my app / libraries, as I can't seem to replicate it on a clean project. However, I've been trying to debug why it's happening and am totally up a creek without a paddle.
One potential issue I came across while stepping through the events is that the documentClickBind function is being triggered and toggling the state, even if the event is inside the popup. It looks like line 718 is checking to see if the clicked element is inside the datepicker target, but in a popup's case it should probably also be a searching for a child of
popupEl
instead, correct?Adjusting that line locally to the following fixes our issues, but I'm curious how this isn't also occurring in vanilla apps. Does the following make more sense as it's possible to click a custom element the popup that doesn't close the popup?
An example of one of our datepickers:
The text was updated successfully, but these errors were encountered: