Opened 10 years ago

Closed 10 years ago

#12324 closed Bug (fixed)

[IE8] Undo steps not recorded when clicking below the text

Reported by: Olek Nowodziński Owned by: Piotrek Koszuliński
Priority: Normal Milestone: CKEditor 4.4.5
Component: Core : Undo & Redo Version: 4.4.4
Keywords: Cc:

Description (last modified by Piotrek Koszuliński)

Occurs when body doesn't fill entire html element.

  1. Open languages samples (because there's just one line of text).
  2. Click below the text and type.
  3. Click somewhere else below the text and type again.
  4. Undo.
  • Expected: only text typed in 3. should be undid.
  • Actual: all typed text has been undone.

Attachments (1)

ie8_undo_444_regr.mp4 (161.9 KB) - added by Olek Nowodziński 10 years ago.

Download all attachments as: .zip

Change History (11)

Changed 10 years ago by Olek Nowodziński

Attachment: ie8_undo_444_regr.mp4 added

comment:1 Changed 10 years ago by Olek Nowodziński

Summary: [IE8] Regression in undo manager[IE8] Regression in undo manager (an undo step is lost)

comment:2 Changed 10 years ago by Marek Lewandowski

Status: newconfirmed

Reproduced with basic preset using keyboard, had no luck with full preset.

comment:3 Changed 10 years ago by Artur Delura

Owner: set to Artur Delura
Status: confirmedassigned

comment:4 Changed 10 years ago by Artur Delura

I reproduced this on every browser full build (samples)

  1. Open sample with following content: <p>bar baz</p>
  2. Put caret here using mouse: <p>bar ^baz</p>
  3. Type "X".
  4. Put caret here using mouse: <p>^bar Xbaz</p>
  5. Type "X".
  6. Press Ctrl + Z

Actual result: <p>bar ^baz</p>

Expected behaviour is that when we change selection after making changes then snapshot should be saved. But it does not save snapshot when we put caret at the beginning of node (see point 6 - here we put caret at the same beginning of paragraph).

Deeper investigation brings me here:

Saving snapshot is handled here But it's unreliable, because editable has margin on each side, so clicking in margin area does not fire click event, but change selection.

Proposed solution:

To cover 100% use case let's listen selectionChange event and in callback call onNavigationKey method.

this.undoManager.editor.on( 'selectionChange', function() {
    that.onNavigationKey();
} );
Version 4, edited 10 years ago by Artur Delura (previous) (next) (diff)

comment:5 Changed 10 years ago by Artur Delura

Status: assignedreview

Changes in branch:t/12324.

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

Status: reviewreview_failed

2 tests failed in undo/pointer, because you haven't updated them.

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

Owner: changed from Artur Delura to Piotrek Koszuliński
Status: review_failedassigned

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

Description: modified (diff)

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

Summary: [IE8] Regression in undo manager (an undo step is lost)[IE8] Undo steps not recorded when clicking below the text

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

Resolution: fixed
Status: assignedclosed

Fixed on master with git:9fe1013.

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