document.execCommand('copy') not working on Chrome document.execCommand('copy') not working on Chrome google-chrome google-chrome

document.execCommand('copy') not working on Chrome


I am not really clear as to what really happens here...

It seems there is a mismatch as to what should be used between the value and the textContent properties of your textarea.
Chrome seems to always use value, while Firefox uses textContent.