fix(web): focus New/Upload dropdown menus on open (#12698)
The New and Upload button dropdowns did not receive focus when opened, so arrow key navigation between menu items didn't work, unlike the context menu.
This commit is contained in:
1 parent
2f7a7ed095
commit
31a68bbb77
3 files changed
+13
-2
No files matched your search
@@ -0,0 +1,9 @@
|
||||
Bugfix: Fix keyboard navigation in "New" and "Upload" dropdown menus
|
||||
|
||||
Opening the "New" or "Upload" dropdown menu in the Files app toolbar did
|
||||
not move focus into the menu, so pressing the arrow keys had no effect
|
||||
on the highlighted item, unlike the existing right-click context menu.
|
||||
Both dropdowns now focus their first item on open, restoring arrow key
|
||||
navigation.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12646
|
||||
@@ -21,6 +21,7 @@
|
||||
class="oc-width-auto"
|
||||
mode="click"
|
||||
close-on-click
|
||||
focus-on-open
|
||||
padding-size="small"
|
||||
>
|
||||
<oc-list id="create-list" :class="areFileExtensionsShown ? 'expanded-list' : null">
|
||||
@@ -121,6 +122,7 @@
|
||||
mode="click"
|
||||
class="oc-width-auto"
|
||||
close-on-click
|
||||
focus-on-open
|
||||
padding-size="small"
|
||||
@show-drop="showDrop"
|
||||
>
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`CreateAndUpload component > action buttons > should show and be enabled if file creation is possible 1`] = `
|
||||
"<div class="create-and-upload-actions oc-flex-inline oc-mr-s"><span><button type="button" aria-label="New folder" class="oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-primary oc-button-primary-filled" id="new-folder-btn"><!--v-if--> <!-- @slot Content of the button --> <oc-icon-stub name="resource-type-folder" filltype="fill" accessiblelabel="" type="span" size="medium" variation="passive" color=""></oc-icon-stub> <span>New Folder</span></button></span> <span><button type="button" aria-label="Upload files or folders" class="oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-outline" id="upload-menu-btn"><!--v-if--> <!-- @slot Content of the button --> <oc-icon-stub name="upload" filltype="line" accessiblelabel="" type="span" size="medium" variation="passive" color=""></oc-icon-stub> <span>Upload</span></button></span>
|
||||
<oc-drop-stub dropid="upload-menu-drop" popperoptions="[object Object]" toggle="#upload-menu-btn" position="bottom-start" mode="click" closeonclick="true" isnested="false" paddingsize="small" offset="" samewidthastarget="false" focusonopen="false" class="oc-width-auto">
|
||||
<oc-drop-stub dropid="upload-menu-drop" popperoptions="[object Object]" toggle="#upload-menu-btn" position="bottom-start" mode="click" closeonclick="true" isnested="false" paddingsize="small" offset="" samewidthastarget="false" focusonopen="true" class="oc-width-auto">
|
||||
<oc-list-stub raw="false" id="upload-list">
|
||||
<li class="oc-menu-item-hover">
|
||||
<resource-upload-stub btnlabel="" btnclass="oc-width-1-1" isfolder="false"></resource-upload-stub>
|
||||
@@ -19,7 +19,7 @@ exports[`CreateAndUpload component > action buttons > should show and be enabled
|
||||
|
||||
exports[`CreateAndUpload component > file handlers > should show entries for all new file handlers 1`] = `
|
||||
"<div class="create-and-upload-actions oc-flex-inline oc-mr-s"><span><button type="button" aria-label="New folder" class="oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-primary oc-button-primary-filled" id="new-folder-btn"><!--v-if--> <!-- @slot Content of the button --> <oc-icon-stub name="resource-type-folder" filltype="fill" accessiblelabel="" type="span" size="medium" variation="passive" color=""></oc-icon-stub> <span>New Folder</span></button></span> <span><button type="button" aria-label="Upload files or folders" class="oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-outline" id="upload-menu-btn"><!--v-if--> <!-- @slot Content of the button --> <oc-icon-stub name="upload" filltype="line" accessiblelabel="" type="span" size="medium" variation="passive" color=""></oc-icon-stub> <span>Upload</span></button></span>
|
||||
<oc-drop-stub dropid="upload-menu-drop" popperoptions="[object Object]" toggle="#upload-menu-btn" position="bottom-start" mode="click" closeonclick="true" isnested="false" paddingsize="small" offset="" samewidthastarget="false" focusonopen="false" class="oc-width-auto">
|
||||
<oc-drop-stub dropid="upload-menu-drop" popperoptions="[object Object]" toggle="#upload-menu-btn" position="bottom-start" mode="click" closeonclick="true" isnested="false" paddingsize="small" offset="" samewidthastarget="false" focusonopen="true" class="oc-width-auto">
|
||||
<oc-list-stub raw="false" id="upload-list">
|
||||
<li class="oc-menu-item-hover">
|
||||
<resource-upload-stub btnlabel="" btnclass="oc-width-1-1" isfolder="false"></resource-upload-stub>
|
||||
|
||||
Reference in new issue
Block a user