Open broady opened 8 years ago
Thanks for reporting this with clear reproduce steps.
I can reproduce this both on http://www.gopherjs.org/playground/ AND on https://play.golang.org/ in latest stable version of Chrome.
The code for applying formatting is very straightforward, it simply overwrites the entire
Given that it's also a bug on the official Go Playground, I suspect it's a browser thing. Whatever the fix is there is likely to be applicable here as well.
Okay, I just tried the same steps in Firefox, and the issue does not occur there. It undoes the formatting and edits before it without issues.
So, given it's a browser bug (that's likely to be fixed in the future) and not a bug specific to GopherJS Playground, it should be reasonable to close this, right?
It's probably also a good idea to make a small repro case and submit a bug report to Chrome project, if it's not already a known/reported bug.
Tested in latest stable Safari (Version 9.1.2 (11601.7.7)) and the bug happens there too (on both playgrounds). So I suspect it might be a long-standing WebKit issue (and probably already reported, but not easy to fix).
To reproduce:
What I see:
Corrupted text.
What I want to see:
Ctrl+Z undoes formatting, then continues to undo previous operations.
/cc @francesc