Skip to content

Commit

Permalink
Mark submit buttons as such explicitly as we changed the default butt…
Browse files Browse the repository at this point in the history
…on type in ODS (#6548)

Co-authored-by: Pascal Wengerter <[email protected]>

Fix snapshot test
  • Loading branch information
dschmidt authored and pascalwengerter committed Mar 9, 2022
1 parent 13ef611 commit bbf0e26
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions changelog/unreleased/bugfix-enter-in-forms
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
variation="primary"
appearance="filled"
@click="$_addLink"
submit="submit"
>
<translate>Create</translate>
</oc-button>
Expand All @@ -147,6 +148,7 @@
variation="primary"
appearance="filled"
@click="$_updateLink"
submit="submit"
>
<translate>Save</translate>
</oc-button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
appearance="filled"
@click="share"
v-text="$gettext('Share')"
submit="submit"
/>
</div>
<oc-hidden-announcer level="assertive" :announcement="announcement" />
Expand Down
1 change: 1 addition & 0 deletions packages/web-app-files/src/views/PublicLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
appearance="filled"
class="oc-login-authorize-button"
:disabled="!password"
submit="submit"
>
<translate>Continue</translate>
</oc-button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`] = `<oc-text-input-stub id="oc-textinput-3" type="password" clearbuttonaccessiblelabel="" label="Enter password for public link" class="oc-mb-s"></oc-text-input-stub>`;

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`] = `
<oc-button-stub type="button" disabled="true" size="medium" submit="button" variation="primary" appearance="filled" justifycontent="center" gapsize="medium" class="oc-login-authorize-button">
<oc-button-stub type="button" disabled="true" size="medium" submit="submit" variation="primary" appearance="filled" justifycontent="center" gapsize="medium" class="oc-login-authorize-button">
<translate-stub tag="span">Continue</translate-stub>
</oc-button-stub>
`;
Expand All @@ -41,7 +41,7 @@ exports[`PublicLink when the view is not loading anymore and when "passwordRequi
</div>
<div class="oc-card-body">
<oc-text-input-stub id="oc-textinput-3" type="password" clearbuttonaccessiblelabel="" label="Enter password for public link" class="oc-mb-s"></oc-text-input-stub>
<oc-button-stub type="button" disabled="true" size="medium" submit="button" variation="primary" appearance="filled" justifycontent="center" gapsize="medium" class="oc-login-authorize-button">
<oc-button-stub type="button" disabled="true" size="medium" submit="submit" variation="primary" appearance="filled" justifycontent="center" gapsize="medium" class="oc-login-authorize-button">
<translate-stub tag="span">Continue</translate-stub>
</oc-button-stub>
</div>
Expand Down

0 comments on commit bbf0e26

Please sign in to comment.