mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-19 02:59:57 +00:00
Handle copy error for unsupported browsers
This commit is contained in:
parent
f09f42226d
commit
ac395fdfd2
@ -330,7 +330,7 @@ $(function() {
|
||||
|
||||
window.onblur = function () {
|
||||
isActive = false;
|
||||
};
|
||||
};
|
||||
|
||||
clipboard.on('success', function(e) {
|
||||
$(e.trigger).tooltip({
|
||||
@ -342,6 +342,19 @@ $(function() {
|
||||
setTimeout(function() {
|
||||
$(e.trigger).tooltip('hide');
|
||||
}, 2000);
|
||||
e.clearSelection();
|
||||
});
|
||||
|
||||
clipboard.on('error', function(e) {
|
||||
$(e.trigger).tooltip({
|
||||
title: 'Press ⌘C to copy',
|
||||
trigger: 'manual',
|
||||
placement: 'auto'
|
||||
});
|
||||
$(e.trigger).tooltip('show');
|
||||
setTimeout(function() {
|
||||
$(e.trigger).tooltip('hide');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user