From f211004f48439d9077cd7329a31368a901870a00 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Wed, 9 Mar 2022 12:04:05 +0100 Subject: [PATCH] Mark submit buttons as such explicitly as we changed the default button type in ODS (#6548) Co-authored-by: Pascal Wengerter --- changelog/unreleased/bugfix-enter-in-forms | 8 ++++++++ .../components/SideBar/Links/PublicLinks/LinkEdit.vue | 2 ++ .../InviteCollaborator/InviteCollaboratorForm.vue | 1 + packages/web-app-files/src/views/PublicLink.vue | 1 + .../unit/views/__snapshots__/PublicLink.spec.js.snap | 4 ++-- .../Topbar/__snapshots__/ApplicationsMenu.spec.js.snap | 10 +++++----- 6 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 changelog/unreleased/bugfix-enter-in-forms diff --git a/changelog/unreleased/bugfix-enter-in-forms b/changelog/unreleased/bugfix-enter-in-forms new file mode 100644 index 00000000000..f371991553a --- /dev/null +++ b/changelog/unreleased/bugfix-enter-in-forms @@ -0,0 +1,8 @@ +Bugfix: Pressing enter in forms + +We fixed behavior when pressing enter in forms. For instance when adding or editing public links +pressing enter in the name or password input fields, instead of saving the link it opened the datepicker. + + +https://github.com/owncloud/web/pull/6548 +https://github.com/owncloud/owncloud-design-system/pull/2009 diff --git a/packages/web-app-files/src/components/SideBar/Links/PublicLinks/LinkEdit.vue b/packages/web-app-files/src/components/SideBar/Links/PublicLinks/LinkEdit.vue index d82aa0ab7a1..9cf237fb612 100644 --- a/packages/web-app-files/src/components/SideBar/Links/PublicLinks/LinkEdit.vue +++ b/packages/web-app-files/src/components/SideBar/Links/PublicLinks/LinkEdit.vue @@ -136,6 +136,7 @@ variation="primary" appearance="filled" @click="$_addLink" + submit="submit" > Create @@ -147,6 +148,7 @@ variation="primary" appearance="filled" @click="$_updateLink" + submit="submit" > Save diff --git a/packages/web-app-files/src/components/SideBar/Shares/InviteCollaborator/InviteCollaboratorForm.vue b/packages/web-app-files/src/components/SideBar/Shares/InviteCollaborator/InviteCollaboratorForm.vue index 0270b1cdcb6..535e7db6323 100644 --- a/packages/web-app-files/src/components/SideBar/Shares/InviteCollaborator/InviteCollaboratorForm.vue +++ b/packages/web-app-files/src/components/SideBar/Shares/InviteCollaborator/InviteCollaboratorForm.vue @@ -63,6 +63,7 @@ appearance="filled" @click="share" v-text="$gettext('Share')" + submit="submit" /> diff --git a/packages/web-app-files/src/views/PublicLink.vue b/packages/web-app-files/src/views/PublicLink.vue index 3b432c1b8dd..1131aa1a2ae 100644 --- a/packages/web-app-files/src/views/PublicLink.vue +++ b/packages/web-app-files/src/views/PublicLink.vue @@ -43,6 +43,7 @@ appearance="filled" class="oc-login-authorize-button" :disabled="!password" + submit="submit" > Continue diff --git a/packages/web-app-files/tests/unit/views/__snapshots__/PublicLink.spec.js.snap b/packages/web-app-files/tests/unit/views/__snapshots__/PublicLink.spec.js.snap index 749399b2be4..fca4c66ffb1 100644 --- a/packages/web-app-files/tests/unit/views/__snapshots__/PublicLink.spec.js.snap +++ b/packages/web-app-files/tests/unit/views/__snapshots__/PublicLink.spec.js.snap @@ -27,7 +27,7 @@ exports[`PublicLink when the view is not loading anymore and when "passwordRequi exports[`PublicLink when the view is not loading anymore and when "passwordRequired" is set as true and the password input should have a computed label 1`] = ``; exports[`PublicLink when the view is not loading anymore and when "passwordRequired" is set as true and the submit button should be set as disabled if "password" is empty 1`] = ` -