Opened 5 years ago

Closed 5 years ago

#12180 closed Bug (expired)

IE: Delay in the cursor postion setting after the text is pasted.

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: IE Cc:


Based on #10677.

I have tried similar steps CKEditor 4.x and was able to reproduce this issue from CKE 4.0 (works fine in beta) in IE9-11. I didn't need enter mode BR for that.


  1. Open replacebycode.html page and press NEW PAGE
  2. Run below script
    window.setInterval(function() {console.log(window.document.getElementById('cke_1_contents').childNodes[1].contentWindow.getSelection().anchorOffset);}, 200);
  3. Type "This is sample text"
  4. Press "Home"
  5. Select with Shift+Arrow word "This"
  6. Press End
  7. Press Enter (wait a second)
  8. Paste text with Ctrl+V

Result: You will see delay (editor displays 1 and then 4) and in IE10-11 value doesn't get updated (only 1 is logged). You need to move cursor to get offset updated.

I have been able to reproduce this issue from CKEditor 3.2.1 (this is where I could see first delay) in IE9: TC is the same but I needed to have text in editor before running script below:

Ver. 3.2.1
window.setInterval(function() {console.log(window.document.getElementById('cke_contents_editor1').childNodes[0].contentWindow.getSelection().anchorOffset);}, 200);

Anyway this is TC for CKE 3.x thus I'm marking it as won't fix. I have however reported similar issue for CKEditor 4.x.

Change History (3)

comment:1 Changed 5 years ago by Jakub Ś

Status: newconfirmed

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

Status: confirmedpending

Well, I don't see a bug there. Offset changes, but anchor too. First the anchor is element, so offset 1 means after this pasted text node. Then offset changes to 4 what means that something normalised selection by moving it to text node. But it's the same place.

The only question is - what normalises selection - editor or IE. It happens after so long time that I can't think of editor feature which could listen with so long timeout.

Additional question - is this behaviour causing some problems? If not then this ticket should be closed, because it may be odd, but it's not incorrect.

comment:3 Changed 5 years ago by Piotrek Koszuliński

Resolution: expired
Status: pendingclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy