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.
When you have the cursor on the input field of a datepicker, an Esc key press is not propagated to the parent component (a modal box for example), so that the box does not close. When you make the change below on the "scope.keydown" function of this directive, all is ok. For me it's a bug in the two last releases :
scope.keydown = function(evt) {
if (evt.which === 27) {
evt.preventDefault();
if (scope.isOpen) { // new check here !!!
evt.stopPropagation();
}
scope.close();
} else if (evt.which === 40 && !scope.isOpen) {
scope.isOpen = true;
}
};
The text was updated successfully, but these errors were encountered:
In reference to issue angular-ui#3096angular-ui#3096
If the escape key should have other functionality in the context of a form (for example, if datepicker is on a modal) it makes sense to prevent this from happening if escape is used to close the dropdown. If the dropdown is closed, however, the event should be allowed to propagate.
MikeMatusz
added a commit
to MikeMatusz/bootstrap
that referenced
this issue
Jan 12, 2015
In reference to issue angular-ui#3096
If the escape key should have other functionality in the context of a form (for example, if datepicker is on a modal) it makes sense to prevent this from happening if escape is used to close the dropdown. If the dropdown is closed, however, the event should be allowed to propagate.
When you have the cursor on the input field of a datepicker, an Esc key press is not propagated to the parent component (a modal box for example), so that the box does not close. When you make the change below on the "scope.keydown" function of this directive, all is ok. For me it's a bug in the two last releases :
The text was updated successfully, but these errors were encountered: