bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Dropdown prevents default actions for contenteditable elements on Up/Down arrow keys

Open artemkafomin opened this issue 1 year ago • 1 comments

Prerequisites

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

artemkafomin avatar Nov 10 '24 02:11 artemkafomin

Can I try this.

AmanVerma2202 avatar Nov 17 '24 04:11 AmanVerma2202