With Nightly and FF 57.04 It seems that the command
document.execCommand("paste");
is not working on same page:
area = document.createElement("textarea");
area.setAttribute("id", "fcb_txt_area");
if (field) {
field.parentNode.append(area);
}
else {
document.body.appendChild(area);
}
area.contentEditable = true;
area.textContent = '';
area.select();
console.log('Pre-paste: ' + area.value);
document.execCommand("paste");
var value = area.value;
console.log('Post-paste: ' + area.value);
return value;
On these page the Post-paste value is empty.
Strangely it is not consistent: when I load a page the it does not work but it seems that if I run a document.execCommand('copy', false, null);
on the same page using my extension without reloading, then the paste command succeed …
Open nigthly and load this test extension, open the console
Now go to http://rzblx1.uni-regensburg.de/ezeit/fl.phtml?bibid=KUBFR&colors=7&lang=en
Select some text on the page and right click to copy the selection in the clipboard
Click in the search field
Use the shift key to run a keyup event : no text is pasted, even if true is return on the console.
Strangely if you open a empty notepad file, you paste there the clipboard content, reselect it and copy it again, the test works on the page…
It seems that with copying a part of the text from the same page that I want to paste it, I lost the clipboard access.
This behaviour is not show in all the page, for example in this page http://www.unifr.ch/dokpe/en a text copied from the page is always pasted in the custom google search field on the left.
No. P3 means staff will get around to it, it just won’t be in the next dev cycles releases (so that’s 60 and 61) for staff. P5 would mean it would only happen if non-staff implemented it, however.