Closed Bug 202003 Opened 22 years ago Closed 17 years ago

Copy/Paste selection after a previous copy/paste lands in wrong place

Categories

(Core :: DOM: Editor, defect, P1)

x86
Windows XP
defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: rubydoo123, Unassigned)

Details

(Whiteboard: editorbase+)

Attachments

(4 files)

Using a current trunk build on winXP 1. open new compose window 2. enter the following: type type type [enter] type type type [enter] [enter] [enter] 3. I then went to wsj.com and selected the text from the lead-in story (14 April 2003) (attachment 1 [details] [diff] [review]), selected copy, returned to the compose window and selected paste via ctrl+v and did [enter] [enter] 4. I then went back to the browser and went to cnn.com and selected the bulleted list from the right side (14 April 2003)(attachment 2 [details] [diff] [review]) and selected copy, retruned to the compose window, made sure the caret was at the end of the document, and selected paste. What happened: the second paste ended up being pasted above the first paste. Expected: the second paste to follow the first paste function. I tried this several times and have been able to repro each time. I also tested this and instead of selecting and pasting the second bit of text, I just started typing, and the typed text was placed after the first paste, which is what I expected. I also copied the two pages locally and tried repeating the above and when the files were local, I could not repeat the problem. But I will attach the pages for reference.
kathy or simon, weren't one or both of you working on changes here recently?
This selection is from the wsj.com site, and is the text used in the initial bug report. If you are able to go to the wsj.com site to test this. When I selected the text, I selected it from the end of the section to the beginning.
This attachment contains the selection from the cnn.com site 14 April 2003, it is a bulleted list tha was used as the second selection in the initial bug report.
I did a save-page as, so the images may be missing
did a save page as so the images may be missing here too.
Ok, so it looks like it gets pasted in the wrong place, but if I save the document, and then view it in the browser, it is in the correct place. Very, very strange,
Whiteboard: editorbase
And when I toggle to HTML Source, the code is correct but going back to Normal view and it still shows up incorrectly
Is this a regression? Does it have to be exactly those two attachments or can one or the other be something else (plain text? different selection on same page?)? What happens if you skip the step for copying cnn and instead just paste a 2nd copy from wsj (or paste cnn info twice)?
You can use the wsj snippet for both the first and second pastes, or as many as you wish, the second and higher pastes get inserted before the first paste. So, I created a new page, and used just thw wsj snippet, I pasted in the first time and hit enter twice, and pasted again -- the second paste went above the first paste (I bolded a word in the first paste so I could tell). Then, I bolded another word in the second paste, went to the end of the first paste (which was at the bottom) hit enter twice and selected paste. And here is the cool part -- the second paste dropped below the first paste and the thrid paste was dropped above the first paste. I tried the same testing with just the cnn snippet and the issue does not exist. It is unique to the wsj snippet. However, when using the wsj as the initial paste, it does not matter what the second paste is.
beppe--this sounds like bad markup (in wsj snippet); could you run it through validation and confirm? This may be a duplicate of a bug already on Joe's plate (with a minimal testcase?)
yep, sure enough there was a nested div in a span. So, looking at Joe's bug list, the only one that looks remotely similar is bug 192323 -- is that the right one to dup this to?
editorbase+ for further investigation. If this is bad HTML we may need to do fixup on the editor size if the bad HTML was generated from a commonly used web tool.
Whiteboard: editorbase → editorbase+
Priority: -- → P1
Target Milestone: --- → Future
QA Contact: bugzilla → editor
Assignee: mozeditor → nobody
WFM Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a2pre) Gecko/20080813031200 Shredder/3.0b1pre and reporter is gone
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: