Opened 10 years ago

Last modified 10 years ago

#12658 confirmed Bug

Wrong caret position on undo.

Reported by: Artur Delura Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc: jonasw@…, andersjo@…

Description (last modified by Piotrek Koszuliński)

Tested with http://ckeditor.com/demo (which reports v4.4.5) using latest Chrome.

  1. Clear editor contents.
  2. Add some online image using dialog (Be sure to preload image in dialog).
  3. Type some text - I typed foo.
  4. Execute undo command.
  5. Execute redo command.

Actual result: Caret position is right after image but should be where it was before executing undo command.

Problem: Native getSelection().getRanges()[0] returns wrong offset which is 0 but should be 3. And this wrong range is saved in snapshot before executing undo command.

I checked already whether selection is changed somehow by CKEditor code by simply adding onselectionchange listener. But it's not.

Case to verify

We think that the TC reported in http://dev.ckeditor.com/ticket/12515#comment:14 is related to this ticket and should be verified together with it.

Change History (5)

comment:1 Changed 10 years ago by Artur Delura

Description: modified (diff)

comment:2 Changed 10 years ago by Piotrek Koszuliński

Description: modified (diff)
Status: newconfirmed

comment:3 Changed 10 years ago by Jonas Walldén

Cc: jonasw@… added

comment:4 Changed 10 years ago by Anders Johansson

Cc: andersjo@… added

comment:5 Changed 10 years ago by Piotr Jasiun

Might be related: #12694.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy