Fossil SCM

Same as [31af8053] but in src/copybtn.js, upon which code fossil.copybutton.js was apparently based. This other file may be going away soon, but until then, it avoids a warning.

wyoung 2020-08-20 21:15 trunk
Commit c0cb0b9d33b9d3e16f0ff32b2c8f706cc652ff7a52f997453479813cac64c625
1 file changed +1 -1
+1 -1
--- src/copybtn.js
+++ src/copybtn.js
@@ -80,11 +80,11 @@
8080
}.bind(null,this.id),400);
8181
}
8282
/* Create a temporary <textarea> element and copy the contents to clipboard. */
8383
function copyTextToClipboard(text){
8484
if( window.clipboardData && window.clipboardData.setData ){
85
- clipboardData.setData('Text',text);
85
+ window.clipboardData.setData('Text',text);
8686
}else{
8787
var x = document.createElement("textarea");
8888
x.style.position = 'fixed';
8989
x.value = text;
9090
document.body.appendChild(x);
9191
--- src/copybtn.js
+++ src/copybtn.js
@@ -80,11 +80,11 @@
80 }.bind(null,this.id),400);
81 }
82 /* Create a temporary <textarea> element and copy the contents to clipboard. */
83 function copyTextToClipboard(text){
84 if( window.clipboardData && window.clipboardData.setData ){
85 clipboardData.setData('Text',text);
86 }else{
87 var x = document.createElement("textarea");
88 x.style.position = 'fixed';
89 x.value = text;
90 document.body.appendChild(x);
91
--- src/copybtn.js
+++ src/copybtn.js
@@ -80,11 +80,11 @@
80 }.bind(null,this.id),400);
81 }
82 /* Create a temporary <textarea> element and copy the contents to clipboard. */
83 function copyTextToClipboard(text){
84 if( window.clipboardData && window.clipboardData.setData ){
85 window.clipboardData.setData('Text',text);
86 }else{
87 var x = document.createElement("textarea");
88 x.style.position = 'fixed';
89 x.value = text;
90 document.body.appendChild(x);
91

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button