discourse/plugins/discourse-assign/spec/system/page_objects
Régis Hanol f363ae5a15
FIX: Allow Enter key to work inside select-kit within modals (#36596)
When selecting an item in a select-kit dropdown (e.g., the assignee
chooser in the assign modal), pressing Enter would close the modal
without completing the selection.

This was caused by commit 1d2ae5159b which added `{ capture: true }` to
the modal's keydown listener to prevent keypresses from leaking outside
modals. However, this caused the modal to intercept Enter before the
select-kit could process it, triggering the primary button click
prematurely.

Add a check for `.select-kit` elements in `shouldTriggerClickOnEnter()`
so the modal defers to select-kit's own Enter key handling.

Ref - meta/t/390910
2025-12-11 10:41:32 +01:00
..
components
modals
pages