Fossil SCM

Added a "window." reference to a global variable in fossil.dom.js to make explicit where the variable is coming from. All the surrounding code does this, and the fix quiets a complaint from GCC.

wyoung 2020-08-20 20:25 trunk
Commit 31af8053486909582b1b8fd821ff2f2da6320c0d0b6d93a8de9e65c06ce3cdf7
1 file changed +1 -1
--- src/fossil.dom.js
+++ src/fossil.dom.js
@@ -521,11 +521,11 @@
521521
Attempts to copy the given text to the system clipboard. Returns
522522
true if it succeeds, else false.
523523
*/
524524
dom.copyTextToClipboard = function(text){
525525
if( window.clipboardData && window.clipboardData.setData ){
526
- clipboardData.setData('Text',text);
526
+ window.clipboardData.setData('Text',text);
527527
return true;
528528
}else{
529529
const x = document.createElement("textarea");
530530
x.style.position = 'fixed';
531531
x.value = text;
532532
--- src/fossil.dom.js
+++ src/fossil.dom.js
@@ -521,11 +521,11 @@
521 Attempts to copy the given text to the system clipboard. Returns
522 true if it succeeds, else false.
523 */
524 dom.copyTextToClipboard = function(text){
525 if( window.clipboardData && window.clipboardData.setData ){
526 clipboardData.setData('Text',text);
527 return true;
528 }else{
529 const x = document.createElement("textarea");
530 x.style.position = 'fixed';
531 x.value = text;
532
--- src/fossil.dom.js
+++ src/fossil.dom.js
@@ -521,11 +521,11 @@
521 Attempts to copy the given text to the system clipboard. Returns
522 true if it succeeds, else false.
523 */
524 dom.copyTextToClipboard = function(text){
525 if( window.clipboardData && window.clipboardData.setData ){
526 window.clipboardData.setData('Text',text);
527 return true;
528 }else{
529 const x = document.createElement("textarea");
530 x.style.position = 'fixed';
531 x.value = text;
532

Keyboard Shortcuts

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