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 )
Occurs when body doesn't fill entire html element.
- Open languages samples (because there's just one line of text).
- Click below the text and type.
- Click somewhere else below the text and type again.
- Undo.
- Expected: only text typed in 3. should be undid.
- Actual: all typed text has been undone.
Attachments (1)
Change History (11)
Changed 10 years ago by
Attachment: | ie8_undo_444_regr.mp4 added |
---|
comment:1 Changed 10 years ago by
Summary: | [IE8] Regression in undo manager → [IE8] Regression in undo manager (an undo step is lost) |
---|
comment:2 Changed 10 years ago by
Status: | new → confirmed |
---|
comment:3 Changed 10 years ago by
Owner: | set to Artur Delura |
---|---|
Status: | confirmed → assigned |
comment:4 Changed 10 years ago by
I reproduced this on every browser full build (samples)
- Open sample with following content:
<p>bar baz</p>
- Put caret here using mouse:
<p>bar ^baz</p>
- Type "X".
- Put caret here using mouse:
<p>^bar Xbaz</p>
- Type "X".
- 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. So it's not a regression, a not only basic build specific and not IE8 specific.
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(); } );
Or to bind event to editor document element if editable is not inline.
comment:6 Changed 10 years ago by
Status: | review → review_failed |
---|
2 tests failed in undo/pointer, because you haven't updated them.
comment:7 Changed 10 years ago by
Owner: | changed from Artur Delura to Piotrek Koszuliński |
---|---|
Status: | review_failed → assigned |
comment:8 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:9 Changed 10 years ago by
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
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed on master with git:9fe1013.
Reproduced with basic preset using keyboard, had no luck with full preset.