Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark submit buttons as such explicitly #6548

Merged
merged 2 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

exports[`ApplicationsMenu component should render navigation with button and menu items in dropdown 1`] = `
<nav id="applications-menu" aria-label="Main navigation" class="oc-flex oc-flex-middle">
<oc-button-stub id="_appSwitcherButton" appearance="raw" variation="inverse" aria-label="Application Switcher" class="oc-topbar-menu-burger">
<oc-icon-stub name="grid" size="large" class="oc-flex"></oc-icon-stub>
<oc-button-stub type="button" size="medium" arialabel="Application Switcher" variation="inverse" appearance="raw" justifycontent="center" gapsize="medium" id="_appSwitcherButton" class="oc-topbar-menu-burger">
<oc-icon-stub name="grid" filltype="fill" accessiblelabel="" type="span" size="large" variation="passive" color="" class="oc-flex"></oc-icon-stub>
</oc-button-stub>
<oc-drop-stub drop-id="app-switcher-dropdown" toggle="#_appSwitcherButton" mode="click" padding-size="small" close-on-click="">
<oc-drop-stub dropid="app-switcher-dropdown" toggle="#_appSwitcherButton" position="bottom-start" mode="click" closeonclick="true" paddingsize="small">
<oc-list-stub class="applications-list">
<li>
<oc-button-stub type="router-link" to="/files" appearance="raw" variation="passive" class=""><span class="icon-box"><oc-icon-stub name="folder"></oc-icon-stub></span> <span>Files</span>
<oc-button-stub type="router-link" size="medium" to="/files" variation="passive" appearance="raw" justifycontent="center" gapsize="medium" class=""><span class="icon-box"><oc-icon-stub name="folder" filltype="fill" accessiblelabel="" type="span" size="medium" variation="passive" color=""></oc-icon-stub></span> <span>Files</span>
<!---->
</oc-button-stub>
</li>
<li>
<oc-button-stub type="a" target="_blank" href="http://some.org" appearance="raw" variation="passive" class=""><span class="icon-box"><oc-icon-stub name="some-icon"></oc-icon-stub></span> <span>External</span>
<oc-button-stub type="a" size="medium" href="http://some.org" variation="passive" appearance="raw" justifycontent="center" gapsize="medium" target="_blank" class=""><span class="icon-box"><oc-icon-stub name="some-icon" filltype="fill" accessiblelabel="" type="span" size="medium" variation="passive" color=""></oc-icon-stub></span> <span>External</span>
<!---->
</oc-button-stub>
</li>
Expand Down