Skip to content

Commit 8d60997

Browse files
Independent Panel: prevent swallowing keyboard activation on delete controls\n\n- Only activate list item on Enter/Space when the item itself is focused (currentTarget===target)\n- Avoid blocking DeleteButton confirm/cancel keyboard interaction while keeping list item keyboard support\n\nWhy: Fixes accessibility issue where preventDefault on wrapper consumed Enter/Space intended for nested controls, noted in review.\n
1 parent c5814f9 commit 8d60997

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/IndependentPanel/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function App() {
265265
setSessionIdSafe(session.sessionId)
266266
}}
267267
onKeyDown={(e) => {
268-
if (e.key === 'Enter' || e.key === ' ') {
268+
if ((e.key === 'Enter' || e.key === ' ') && e.currentTarget === e.target) {
269269
e.preventDefault()
270270
setSessionIdSafe(session.sessionId)
271271
}

0 commit comments

Comments
 (0)