mirror of
https://github.com/storytold/craft-libs.git
synced 2026-12-01 02:36:54 +01:00
With RootEnv::escape_leaves_fields on, a text field took Escape and gave up the focus unless it sat in a modal dialog. In a modeless dialog whose Escape closes it (one with a footer, such as Find and Replace), the first Escape left nothing focused, and a modeless layer does not take an Escape while the focus is outside it, so no later Escape closed the dialog and the focus never went back to the opener. The field now keeps the focus in any dialog on top whose Escape closes it, modal or modeless. An Escape the field does not take for its typing closes the dialog, which returns the focus to its opener. In a modeless dialog the first Escape still reverts a draft.