bootstrap
bootstrap copied to clipboard
Dropdown prevents default actions for contenteditable elements on Up/Down arrow keys
Prerequisites
- [X] I have searched for duplicate or closed issues
- [X] I have validated any HTML to avoid common problems
- [X] I have read the contributing guidelines
Describe the issue
In the attached example, the prevention of default actions makes it impossible to navigate between lines using the up and down arrow keys.
I encountered this issue while working with CodeMirror. Because of this behavior, I was unable to move between lines of code.
I suggest expanding the condition on this line to stop processing if the event target is a contenteditable element:
https://github.com/twbs/bootstrap/blob/cbbb567b637e24882fd0fad62bca49e248afb9a4/js/src/dropdown.js#L406
Reduced test cases
https://codepen.io/artemkafomin/pen/wvVQZmR
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
v5.3.3
Can I try this.