Opened 11 years ago
Closed 10 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: |
Description
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.
MY TC:
- Open replacebycode.html page and press NEW PAGE
- Run below script
window.setInterval(function() {console.log(window.document.getElementById('cke_1_contents').childNodes[1].contentWindow.getSelection().anchorOffset);}, 200);
- Type "This is sample text"
- Press "Home"
- Select with Shift+Arrow word "This"
- Press End
- Press Enter (wait a second)
- 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 11 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 11 years ago by
Status: | confirmed → pending |
---|
comment:3 Changed 10 years ago by
Resolution: | → expired |
---|---|
Status: | pending → closed |
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.