New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Focus on datepicker footer triggers extra selects #3444
Comments
Thanks for opening this your issue @Nosfistis . After a quick investigation, it seems it's because 'select' is a native event which is triggered by the browser when the input is focused, which is the same name of the one used to select a day. It is not supported by all the browsers. https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onselect |
I did not think of a native event at all! It confused my why it's not named |
Hey, @Nosfistis. Thanks for reporting this.
Anyway I suggest we:
|
This commit changes name of the component custom event to avoid conflicts with native 'select' event. Existing event name is marked as deprecated for backward compatibility. Fixes ng-bootstrap#3444
This commit changes name of the component custom event to avoid conflicts with native 'select' event. Existing event name is marked as deprecated for backward compatibility. Fixes ng-bootstrap#3444
This commit changes name of the component custom event to avoid conflicts with native 'select' event. Existing event name is marked as deprecated for backward compatibility. Fixes ng-bootstrap#3444
This commit changes name of the component custom event to avoid conflicts with native 'select' event. Existing event name will be marked as deprecated in v6. Fixes ng-bootstrap#3444
This commit changes name of the component custom event to avoid conflicts with native 'select' event. Existing event name will be marked as deprecated in v6. Fixes #3444
Not yet fully fixed actually, will keep it open for |
Closed in #3611 |
Bug description:
When using a datepicker with a custom footer, if that footer contains focusable elements (e.g. inputs), navigating between those elements with keyboard tab causes select events which are invalid. The selection payload is not an
NgbDate
instance, but a JSEvent
withtype: 'select'
.Link to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/edit/ng-bootstrap-footer-focus
Versions of Angular, ng-bootstrap and Bootstrap:
Angular: 8.2.12
ng-bootstrap: 5.1.2
Bootstrap: 4.3.0
The text was updated successfully, but these errors were encountered: