Skip to content

Commit dd59260

Browse files
Prevent session selection when clicking delete wrapper
Stop click/keyboard propagation on the delete action wrapper in the Independent Panel chat list. This avoids accidental session selection when users click the whitespace around the delete icon, aligning with review feedback about event propagation safety. No functional changes to DeleteButton itself; this is an extra guard at the container level. Validated via npm run lint and build; both pass.
1 parent a96b203 commit dd59260

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/pages/IndependentPanel/App.jsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,18 @@ function App() {
261261
}}
262262
>
263263
{session.sessionName}
264-
<span className="gpt-util-group">
264+
<span
265+
className="gpt-util-group"
266+
onClick={(e) => {
267+
e.stopPropagation()
268+
}}
269+
onKeyDown={(e) => {
270+
if (e.key === 'Enter' || e.key === ' ') {
271+
e.preventDefault()
272+
e.stopPropagation()
273+
}
274+
}}
275+
>
265276
<DeleteButton
266277
size={14}
267278
text={t('Delete Conversation')}

0 commit comments

Comments
 (0)