mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-18 07:12:15 +00:00
fix #112 and differentiate between textContent and innerText
This commit is contained in:
@@ -5,7 +5,7 @@ if (!navigator.clipboard) {
|
||||
|
||||
// A <span> contains the text to copy
|
||||
const span = document.createElement('span');
|
||||
span.textContent = text;
|
||||
span.innerText = text;
|
||||
span.style.whiteSpace = 'pre'; // Preserve consecutive spaces and newlines
|
||||
|
||||
// Paint the span outside the viewport
|
||||
|
||||
Reference in New Issue
Block a user