3 ms·
> [...] 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.
by 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.