# “Assign”对话框行为一夜之间改变为需要鼠标操作

**URL:** <https://meta.discourse.org/t/assign-dialog-behavior-changed-overnight-to-require-mousing/390910>\
**Category:** UX\
**Tags:** assign\
**Created:** [2025年十二月10日 13:47 UTC](https://meta.discourse.org/t/assign-dialog-behavior-changed-overnight-to-require-mousing/390910 "2025-12-10T13:47:15Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [2025年十二月10日 15:20 UTC](https://meta.discourse.org/t/assign-dialog-behavior-changed-overnight-to-require-mousing/390910/4 "2025-12-10T15:20:40Z")

</div>

模态框真的很难做好 😬

希望这能修复问题，并且不会引入任何回归 🤞

> <https://github.com/discourse/discourse/pull/36596>
>
> When selecting an item in a select-kit dropdown (e.g., the assignee chooser in t…he 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

---

_[View the full topic](https://meta.discourse.org/t/assign-dialog-behavior-changed-overnight-to-require-mousing/390910)._
