diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-09-27 19:05:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-27 19:05:00 +0200 |
commit | 5c8cab61aba82c987adb59aad1b7cc3b67fbadc3 (patch) | |
tree | 755e1d3b58000799934af4d3e77b9bea8b860ded /apps | |
parent | f875a81a07524b540e7607c270529d9f3e8f101b (diff) | |
parent | 42bc63f1a05c726d6d2c99adb473bdbd03184a2b (diff) | |
download | nextcloud-server-5c8cab61aba82c987adb59aad1b7cc3b67fbadc3.tar.gz nextcloud-server-5c8cab61aba82c987adb59aad1b7cc3b67fbadc3.zip |
Merge pull request #34288 from nextcloud/bugfix/34281/fix-copy-internal-link-focus
Fix focussing to internal link after copy
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryInternal.vue | 10 | ||||
-rw-r--r-- | apps/files_sharing/src/components/SharingEntrySimple.vue | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryInternal.vue b/apps/files_sharing/src/components/SharingEntryInternal.vue index 468275aac2c..03a1ba87b71 100644 --- a/apps/files_sharing/src/components/SharingEntryInternal.vue +++ b/apps/files_sharing/src/components/SharingEntryInternal.vue @@ -1,15 +1,15 @@ <template> <ul> - <SharingEntrySimple class="sharing-entry__internal" + <SharingEntrySimple ref="shareEntrySimple" + class="sharing-entry__internal" :title="t('files_sharing', 'Internal link')" :subtitle="internalLinkSubtitle"> <template #avatar> <div class="avatar-external icon-external-white" /> </template> - <NcActionLink ref="copyButton" - :href="internalLink" + <NcActionLink :href="internalLink" :aria-label="t('files_sharing', 'Copy internal link to clipboard')" target="_blank" :icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'" @@ -84,8 +84,8 @@ export default { async copyLink() { try { await this.$copyText(this.internalLink) - // focus and show the tooltip - this.$refs.copyButton.$el.focus() + // focus and show the tooltip (note: cannot set ref on NcActionLink) + this.$refs.shareEntrySimple.$refs.actionsComponent.$el.focus() this.copySuccess = true this.copied = true } catch (error) { diff --git a/apps/files_sharing/src/components/SharingEntrySimple.vue b/apps/files_sharing/src/components/SharingEntrySimple.vue index 8b495b0743c..0a0f86cd530 100644 --- a/apps/files_sharing/src/components/SharingEntrySimple.vue +++ b/apps/files_sharing/src/components/SharingEntrySimple.vue @@ -29,7 +29,8 @@ {{ subtitle }} </p> </div> - <NcActions v-if="$slots['default']" + <NcActions ref="actionsComponent" + v-if="$slots['default']" class="sharing-entry__actions" menu-align="right" :aria-expanded="ariaExpandedValue"> |