Opened 12 years ago
Closed 12 years ago
#22199 closed defect (bug) (fixed)
Pasting text containing line breaks results in misplaced cursor
Reported by: | chrisrudzki | Owned by: | |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | TinyMCE | Keywords: | needs-patch dev-feedback |
Focuses: | Cc: |
Description
Steps to reproduce
- Add or edit a post
- Switch to Visual Editor
- Paste some text that includes line breaks
- Notice that the cursor jumps to the beginning of the last line pasted, rather than the end of the line.
Sample text to paste:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas non erat ac felis cursus ornare. Nunc elementum, magna rhoncus imperdiet ultricies, nisl nulla tempus dui, at mollis risus orci nec lectus.
Change History (11)
#4
@
12 years ago
@nacin:
No - I can reproduce it across the latest releases of Firefox, Chrome, and Safari.
As it turns out, I have a tricky time reproducing it by simply copying and directly pasting the "sample text" into the visual editor. You might want to try pasting it into a text editor first.
#5
@
12 years ago
I can only reproduce it consistently in FF 16.0.1
It did occur in Chrome 22 too, though. Odd.
#6
@
12 years ago
The only way I see to fix this is to insert another paragraph after the pasted text. The caret would go in the new paragraph then. Forcing new paragraphs after each pasted content may be a bit too drastic though.
Will pass that upstream, perhaps another fix would be possible.
#7
@
12 years ago
- Cc jeremy@… added
I was able to reproduce the problem:
- In Chrome/Mac and Safari/Mac
- With the latest version of Trunk.
- In the Visual Editor as well as in the DFW.
- Only after expanding the Text area thanks to the "handle" in the bottom right corner of the editor.
I recorded myself and posted the video here, if that helps:
As you can see, the screen also jumps back to the top of the Visual Editor when I paste in some content.
#9
@
12 years ago
Replying to hd-J:
Could you confirm if this is happening in the TinyMCE demo: http://www.tinymce.com/tryit/full.php
I couldn't reproduce either problem (caret placement after pasting and scrolling to top) there.
While I'd consider it a minor bug, it seems to be pretty annoying and I just had another user complain about it over at .com.
@azaozz, is there a chance we could look into that for 3.5?