adblock-filter-analyzer icon indicating copy to clipboard operation
adblock-filter-analyzer copied to clipboard

richTextBox undo behavior is buggy

Open RedDragonWebDesign opened this issue 5 years ago • 2 comments

  1. paste good tests
  2. select all, paste bad tests over it
  3. add a space to a random word
  4. hit ctrl-z (undo). space is not deleted.
  5. hit ctrl-z a couple more times. the good tests text comes back, but appended to the end of the bad tests list

RedDragonWebDesign avatar Jul 06 '20 05:07 RedDragonWebDesign

Also, paste over old text with new text. Then Ctrl-Z. It will leave the new text, and put the old text beneath it.

RedDragonWebDesign avatar Jul 14 '20 13:07 RedDragonWebDesign

Can potentially solve this by using document.execCommand(). That plays nicely with undo and redo.

Can potentially re-factor to use document.execCommand(hiliteColor, ??, "Orange"). Might also fix the richTextBox cursor issue

RedDragonWebDesign avatar Jul 14 '20 13:07 RedDragonWebDesign