Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Cursor jumps to wrong place after undoing 2nd colorpicker change #2805

@peterflynn

Description

@peterflynn

This requires NJ's fix in #2790 to repro.

  1. Open a color picker
  2. Drag the slider
  3. Leaving it open, click elsewhere in the document and insert a char
  4. Drag the color picker slider again
  5. Close the color picker
  6. Undo

Result: 2nd color picker change is undone, but cursor jumps to where you inserted the char. If the edit is far away, the view will scroll such that the color (the text that the undo is modifying) isn't even visible.

Expected: 2nd color picker change is undone, and cursor jumps to the color (or color is selected)

I'm guessing this occurs because programmatic edits don't explicitly move the cursor to the location before making the edit. So the CM undo record stores wherever the cursor was positioned before the colorpicker drag, and restores that location when undoing the colorpicker change, even though it has nothing to do with the edit. That would be a bug (IMHO) in the new CMv3 feature that restores the selection/cursor on undo.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions