ng-bootstrap / ng-bootstrap/ng-bootstrap
NgbDatepickerKeyboardService in NgbDatepicker stops certain keydown events (E.g. Enter, Space) from bubbling.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.2k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Bug description:
Not sure if it is a feature request or a bug. Consumers aren't able to bind their own functionality to already existing keydown events that are handled by the ngbDatepickerKeyboardService in ngbDatePicker. In the example it can be seen that listening for keyDown event will only work for keys that are not stopped by ngbDatepickerKeyboardService.
Are there any particular reasons why it is done so?
Link to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/edit/angular-13pnbx?file=src%2Fapp%2Fdatepicker-basic.ts
Versions of Angular, ng-bootstrap:
Angular: 14.1.2
ng-bootstrap: 13.0.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproduction and trace how NgbDatepickerKeyboardService handles keydown events for Enter and Space. Compare those events with keys that continue bubbling, then clarify the intended consumer behavior; done means the expected bubbling behavior is established and verified against the reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100