🐛 Bug Report
When using ListBox, if you have an <input type="text" /> element, when typing in the input field, space characters are being ignored.
🤔 Expected Behavior
Typing in the input field would work as normal without keyboard presses being intercepted.
😯 Current Behavior
When pressing the space bar with the <input> focused, ListBox assumes I am selecting the option row as opposed to typing into the input field.
💁 Possible Solution
- Detect current target of the event vs target of the state of selection manager and ensure they match, or
- Detect we are inside a user input field and ignore selection management
🔦 Context
DND Sortable list with user input
💻 Code Sample
https://codesandbox.io/s/great-sutherland-cqksy8?file=/src/App.js
Focus any of the <input type="text" /> fields, type some random characters, then try typing a space. The space will be ignored and if you look at the dom element, you'll see the data-pressed=true prop has been set.
🐛 Bug Report
When using
ListBox, if you have an<input type="text" />element, when typing in the input field, space characters are being ignored.🤔 Expected Behavior
Typing in the input field would work as normal without keyboard presses being intercepted.
😯 Current Behavior
When pressing the space bar with the
<input>focused,ListBoxassumes I am selecting the option row as opposed to typing into the input field.💁 Possible Solution
🔦 Context
DND Sortable list with user input
💻 Code Sample
https://codesandbox.io/s/great-sutherland-cqksy8?file=/src/App.js
Focus any of the
<input type="text" />fields, type some random characters, then try typing a space. The space will be ignored and if you look at the dom element, you'll see thedata-pressed=trueprop has been set.