antonmedv/codejar

Strg+A Strg+C copies only subselection in Firefox (when plaintext-only is not supported)

Gnietschow opened this issue · 5 comments

When I use Strg+A to select all content in Firefox and then Strg+C to copy it, it won't copy the whole content. It can easily tested by opening https://medv.io/codejar/ in Firefox and trying that in the first code editor.

I tracked that issue down to the line
if (isLegacy) restore(save());
in the keydown handler, which seems to move the selection end unexpectedly before the copy is handled.

Well. Firefox has to many bugs in wyswyg editor. I give up to fix bugs in Firefox. You can try to fix and PR ;)

PS it’s literally bugs in ff. not different with blink/webkit.

Understandable :) Do you remember for which case the line was added? If I remove it, it seems to work normally for me. But of course I'm not seeing the whole picture. I would make a PR with an exempt for that line in case of a Strg+C if that is ok for you.

Not remember unfortunately. I’ll gonna try to add some test to cover this part.

I created a PR for the issue. My first one ever, so please tell me if I made something wrong :)

Released 3.7.0