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
  • Loading branch information
dschmidt committed Mar 7, 2022
1 parent a97c62d commit d79cb70
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 19 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" 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" 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 @@ -20,10 +20,9 @@ exports[`Trashbin View when the view is not loading anymore when length of the p
<tr tabindex="-1" data-item-id="file-id-1234" draggable="false" class="oc-tbody-tr oc-tbody-tr-file-id-1234">
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-table-data-cell oc-table-data-cell-select oc-pl-m "><span><input id="resource-table-select-file-id-1234" type="checkbox" name="checkbox" class="oc-checkbox oc-rounded oc-checkbox-l" value="[object Object]"> <label for="resource-table-select-file-id-1234" class="oc-invisible-sr oc-cursor-pointer">Select folder</label></span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-expand oc-text-truncate oc-table-data-cell oc-table-data-cell-name">
<div class="oc-resource oc-text-overflow">
<!---->
<div class="oc-resource-details oc-text-overflow"><span data-test-resource-path="/file-path/1234" data-test-resource-name="file-path/file-name-1234" data-test-resource-type="folder" class="oc-resource-name"><span class="oc-text-truncate"><span class="oc-resource-basename">file-name-1234</span></span>
<!----></span>
<div class="oc-resource oc-text-overflow"><span><span class="oc-icon oc-icon-l oc-icon-passive oc-resource-icon oc-resource-icon-file"><!----></span></span>
<div class="oc-resource-details oc-text-overflow"><span class="oc-text-overflow"><!----> <span data-test-resource-path="/file-path/1234" data-test-resource-name="file-path/file-name-1234" data-test-resource-type="folder" class="oc-resource-name"><span class="oc-text-truncate"><span class="oc-resource-basename">file-name-1234</span></span>
<!----></span></span>
<div class="oc-resource-indicators">
<router-link-stub to="[object Object]" class="parent-folder" style="cursor: pointer;"><span class="oc-icon oc-icon-s oc-icon-passive"><!----></span> <span class="text">file-path</span></router-link-stub>
<!---->
Expand All @@ -41,10 +40,9 @@ exports[`Trashbin View when the view is not loading anymore when length of the p
<tr tabindex="-1" data-item-id="file-id-5896" draggable="false" class="oc-tbody-tr oc-tbody-tr-file-id-5896">
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-table-data-cell oc-table-data-cell-select oc-pl-m "><span><input id="resource-table-select-file-id-5896" type="checkbox" name="checkbox" class="oc-checkbox oc-rounded oc-checkbox-l" value="[object Object]"> <label for="resource-table-select-file-id-5896" class="oc-invisible-sr oc-cursor-pointer">Select folder</label></span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-expand oc-text-truncate oc-table-data-cell oc-table-data-cell-name">
<div class="oc-resource oc-text-overflow">
<!---->
<div class="oc-resource-details oc-text-overflow"><span data-test-resource-path="/file-path/5896" data-test-resource-name="file-path/file-name-5896" data-test-resource-type="folder" class="oc-resource-name"><span class="oc-text-truncate"><span class="oc-resource-basename">file-name-5896</span></span>
<!----></span>
<div class="oc-resource oc-text-overflow"><span><span class="oc-icon oc-icon-l oc-icon-passive oc-resource-icon oc-resource-icon-file"><!----></span></span>
<div class="oc-resource-details oc-text-overflow"><span class="oc-text-overflow"><!----> <span data-test-resource-path="/file-path/5896" data-test-resource-name="file-path/file-name-5896" data-test-resource-type="folder" class="oc-resource-name"><span class="oc-text-truncate"><span class="oc-resource-basename">file-name-5896</span></span>
<!----></span></span>
<div class="oc-resource-indicators">
<router-link-stub to="[object Object]" class="parent-folder" style="cursor: pointer;"><span class="oc-icon oc-icon-s oc-icon-passive"><!----></span> <span class="text">file-path</span></router-link-stub>
<!---->
Expand All @@ -62,10 +60,9 @@ exports[`Trashbin View when the view is not loading anymore when length of the p
<tr tabindex="-1" data-item-id="file-id-9856" draggable="false" class="oc-tbody-tr oc-tbody-tr-file-id-9856">
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-table-data-cell oc-table-data-cell-select oc-pl-m "><span><input id="resource-table-select-file-id-9856" type="checkbox" name="checkbox" class="oc-checkbox oc-rounded oc-checkbox-l" value="[object Object]"> <label for="resource-table-select-file-id-9856" class="oc-invisible-sr oc-cursor-pointer">Select folder</label></span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-expand oc-text-truncate oc-table-data-cell oc-table-data-cell-name">
<div class="oc-resource oc-text-overflow">
<!---->
<div class="oc-resource-details oc-text-overflow"><span data-test-resource-path="/file-path/9856" data-test-resource-name="file-path/file-name-9856" data-test-resource-type="folder" class="oc-resource-name"><span class="oc-text-truncate"><span class="oc-resource-basename">file-name-9856</span></span>
<!----></span>
<div class="oc-resource oc-text-overflow"><span><span class="oc-icon oc-icon-l oc-icon-passive oc-resource-icon oc-resource-icon-file"><!----></span></span>
<div class="oc-resource-details oc-text-overflow"><span class="oc-text-overflow"><!----> <span data-test-resource-path="/file-path/9856" data-test-resource-name="file-path/file-name-9856" data-test-resource-type="folder" class="oc-resource-name"><span class="oc-text-truncate"><span class="oc-resource-basename">file-name-9856</span></span>
<!----></span></span>
<div class="oc-resource-indicators">
<router-link-stub to="[object Object]" class="parent-folder" style="cursor: pointer;"><span class="oc-icon oc-icon-s oc-icon-passive"><!----></span> <span class="text">file-path</span></router-link-stub>
<!---->
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

0 comments on commit d79cb70

Please sign in to comment.