Use native navigator clipboard over element data clipboard function
This commit is contained in:
parent
236a93d69d
commit
1871992303
1 changed files with 6 additions and 1 deletions
|
|
@ -11,10 +11,15 @@ angular.module('copayApp.services').factory('clipboardService', function ($http,
|
|||
cordova.plugins.clipboard.copy(data);
|
||||
} else if (platformInfo.isNW) {
|
||||
nodeWebkitService.writeToClipboard(data);
|
||||
} else if (navigator && navigator.clipboard) {
|
||||
$log.debug("Use navigator clipboard.")
|
||||
navigator.clipboard.writeText(data).catch(err => {
|
||||
$log.debug("Clipboard writing is not supported in your browser..");
|
||||
});
|
||||
} else if (clipboard.supported) {
|
||||
clipboard.copyText(data);
|
||||
} else {
|
||||
// No supported
|
||||
// Not supported
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue