-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(files_sharing): Fallback to old style clipboard copy for internal links #45593
Conversation
/compile amend / |
Signed-off-by: Josh <josh.t.richards@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
831a7a9
to
da793b5
Compare
if (window.isSecureContext) { | ||
await navigator.clipboard.writeText(this.internalLink) | ||
} else { // nothing to lose by trying the fallback | ||
document.execCommand('copy') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the link selected in this case?
(Another fallback would be window.prompt(t('Please copy the link manually'), this.internalLink)
)
Correct commit scope would be |
This comment was marked as outdated.
This comment was marked as outdated.
/compile amend / |
Signed-off-by: Josh <josh.t.richards@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
6a5aabf
to
7a5e967
Compare
How can I compile nextcloud with this fix? |
@@ -93,7 +93,14 @@ export default { | |||
methods: { | |||
async copyLink() { | |||
try { | |||
await navigator.clipboard.writeText(this.internalLink) | |||
if (window.isSecureContext) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not be needed as this throws if not available.
So all it takes: in the catch block add a window promt.
Closing. Replaced by #49141 |
Summary
TODO
Checklist