2 ms·
On my browser (Firefox 96), the paste command seems to just return false and do nothing.
by marcosdumay 5y ago
On my browser (Firefox 96), the paste command seems to just return false and do nothing.
- edave64 5y agoAre you running it as part of a click handler?
- marcosdumay 5y agoNo, I was trying it on the console, without any context.
- edave64 5y agoAs I said, it needs to be as a direct reaction to user interaction. Though from the other comments, it seems my knowledge here is outdated anyways
- joveian 5y agoMozilla's documentation claims paste with Document.execCommand is disabled for web content (as it should be): https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand https://developer.mozilla.org/en-US/docs/Web/API/Document/ex... On the wider issue, I'd like to only allow a keyboard combination from the window manager / compositor to paste to the focused window. X11 has three different clipboards and I think Wayland has two (I've only seen xsel use the X11 secondary selection) while I've only ever heard of the one clipboard on Windows. The kitty terminal has some method of using the clipboard that works remotely (though all the magic kitty does inspired me to "alias ssh='st ssh'"). I'm not sure if anything other than kitty uses it. The permissions have a specific "ask" option, which seems like something the browsers should support for the Clipboard API. https://sw.kovidgoyal.net/kitty/kittens/clipboard/ https://sw.kovidgoyal.net/kitty/kittens/clipboard/