mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-09 15:38:27 +01:00
Fix OS copy using navigator.clipboard still showed "Use Ctrl+C..."
This commit is contained in:
parent
c8b6a5760b
commit
49829fbbcc
@ -788,7 +788,8 @@ export function egwPopupActionImplementation()
|
|||||||
{
|
{
|
||||||
copyTextToClipboard(event, clipboard_action, os_clipboard_caption).then((successful) =>
|
copyTextToClipboard(event, clipboard_action, os_clipboard_caption).then((successful) =>
|
||||||
{
|
{
|
||||||
if (successful)
|
// Fallback
|
||||||
|
if (typeof successful == "undefined")
|
||||||
{
|
{
|
||||||
// Clear message
|
// Clear message
|
||||||
egw.message(egw.lang("'%1' copied to clipboard", os_clipboard_caption.length > 20 ? os_clipboard_caption.substring(0, 20) + '...' : os_clipboard_caption));
|
egw.message(egw.lang("'%1' copied to clipboard", os_clipboard_caption.length > 20 ? os_clipboard_caption.substring(0, 20) + '...' : os_clipboard_caption));
|
||||||
@ -1008,7 +1009,7 @@ function copyTextToClipboard(event, action, text)
|
|||||||
if (!navigator.clipboard)
|
if (!navigator.clipboard)
|
||||||
{
|
{
|
||||||
let success = fallbackCopyTextToClipboard(event, action, text);
|
let success = fallbackCopyTextToClipboard(event, action, text);
|
||||||
return Promise.resolve(success);
|
return Promise.resolve(success ? undefined : false);
|
||||||
}
|
}
|
||||||
// Use Clipboard API
|
// Use Clipboard API
|
||||||
return navigator.clipboard.writeText(text);
|
return navigator.clipboard.writeText(text);
|
||||||
|
Loading…
Reference in New Issue
Block a user