Skip to content

"Enter" on keyboard should confirm an action, while "Esc" should cancel it #2994

Closed

Description

@schweigisito

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

Whenever something is entered into a text field, "Enter" on keyboard should trigger a "confirm" or "save" action whiling pressing "Esc" should cancel it.

The whole UI should get a "review" regarding this to guarantee a consistent behaviour in all modules and dialogues.

Tested version: 7.3.0

Reproduction Steps

E.g. in renaming groups

  • go to Admin group settings
  • create a group "test group"
  • rename the group by entering "test group xyz"
  • hit "Enter"
    => Action is canceled and group is not renamed

Expected Outcome

"Enter" should trigger a confirmation.

Actual Outcome

Sometimes it cancels the input, which is quite surprising.

Activity

  1. added theissue type on Jul 31, 2026
  2. moved this from Qualification to Prio <= 3 in OpenCloud Team Boardon Aug 11, 2026
  3. changed the title [-]"Enter" on keyboard should confirm and action, while "Esc" should cancel it[/-] [+]"Enter" on keyboard should confirm an action, while "Esc" should cancel it[/+] on Sep 1, 2026
  4. added
    Priority:p3-medium
    and removed
    Priority:p4-low
    on Oct 28, 2026
  5. JammingBen commented on Nov 12, 2026

    @JammingBen
    Member

    I did an analysis with my agent about all the affected places:

    Enter does not confirm / save

    Modals

    • web-pkg/src/components/CreateLinkModal.vue: password and expiry inputs (advanced mode)
    • web-pkg/src/components/CreateShortcutModal.vue: name input. In the URL input, Enter with suggestions open but none highlighted is swallowed (ShortcutTargetInput.vue)
    • web-pkg/src/components/Modals/DatePickerModal.vue: expiry date for shares and links. confirmDisabled is local only and is not emitted to ModalWrapper
    • web-runtime/src/components/Modals/AppTokenModal.vue: note and expiry inputs
    • web-runtime/src/components/EditPasswordModal.vue: password inputs
    • web-app-contacts/src/components/ContactFormPanel.vue: create/edit contact (modal and mobile drawer)
    • web-app-files/src/components/EmbedActions/EmbedActions.vue: file name input in embed mode (Save As / export)
    • web-pkg/src/components/Spaces/QuotaModal.vue (minor): Enter only picks or creates the option in the select
    • web-app-admin-settings AddToGroupsModal / RemoveFromGroupsModal (low): select only, Enter adds an option

    Inline forms

    • web-app-admin-settings/src/components/Groups/SideBar/EditPanel.vue: page reload (see above)
    • web-app-admin-settings/src/components/Users/SideBar/EditPanel.vue: form with several fields and no submit button, so Enter does nothing
    • web-app-admin-settings/src/components/General/AnnouncementSection.vue: banner text, Save is click-only
    • web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/InviteCollaboratorForm.vue: Enter only picks a typeahead option and never shares. The Share button is a submit button but has no <form> around it
    • web-pkg/src/components/Filters/DateFilter.vue: custom date range, Apply is click-only
    • web-app-ocm/src/views/IncomingInvitations.vue: invitation token input

    Esc does not cancel

    • web-app-contacts/src/components/ContactFormPanel.vue: <oc-modal> has no @cancel listener
    • web-app-mail/src/components/MailWidget.vue: expanded compose modal, no @cancel listener
    • web-app-admin-settings Users / Groups SideBar/EditPanel.vue: no Esc to revert changes
    • design-system/src/components/OcSearchBar/OcSearchBar.vue: Esc does not call cancelHandler. With type="search" only the browser default applies: Chromium and Safari clear the field, Firefox does nothing. This affects all filter search bars
    • web-app-search/src/portals/SearchBar.vue: on mobile, Esc only clears the term and leaves the search overlay open
    • web-app-files/src/components/SideBar/Details/TagsSelect.vue: its own map-keydown replaces the one from OcSelect, so the OcSelect Esc handling is lost and the browser's default blur happens instead
    • web-app-files/src/components/SideBar/Shares/SpaceMembers.vue (minor): Esc does not close the member filter
    • web-app-rclone-crypt/src/views/UnlockVault.vue (low): Esc is not bound to the Cancel button

    Notes for fixing

    • Modals that render <oc-modal> directly (contacts, mail) default to active=true. Their Esc listener therefore also fires while a dispatched modal sits on top of them (e.g. "Discard changes?"). Pass :active before wiring @cancel.
    • Simplest fix for custom modal components: wrap the content in <form @submit.prevent="emit('confirm')">. ModalWrapper already ignores the confirm while confirmDisabled or isLoading is set, as long as the component emits update:confirmDisabled.
  6. self-assigned this
    on Nov 12, 2026
  7. moved this from Prio <= 3 to In Progress in OpenCloud Team Boardon Nov 12, 2026
  8. moved this from In Progress to Needs Review in OpenCloud Team Boardon Nov 13, 2026
  9. moved this from Needs Review to Done in OpenCloud Team Boardon Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions