6 ms·
How is this affected by settings in Firefox to prevent sites from reading the clipboard?
by everdrive 3y ago
How is this affected by settings in Firefox to prevent sites from reading the clipboard?
- arp242 3y agoIt's not. I have that disabled (mostly because I hate how GitHub completely mangles and fucks up anything I paste there) and it still works. Arguably, it's "working as intended" because middle click is supposed to paste whatever is selected, and the JS did select some text. Fixing this in a way that won't cause UX regressions and can't be by-passed relatively easily might be rather tricky.
- cesarb 3y ago> [...] and the JS did select some text. Fixing this in a way that won't cause UX regressions and can't be by-passed relatively easily might be rather tricky. One possible approach could be to ignore selections made by JS (instead of directly by the user) for middle click paste. A more refined approach could also allow them when made by JS while handling a mouse click from the user.
- arp242 3y agoThat will cause UX regressions in cases where text is selected by JS and you want to copy it, and leads to "this text is clearly selected but if I press middle click it pastes something else, wtf?!" kind of scenarios. You can consider that to be an acceptable trade-off, but it is a trade-off.