Closed Bug 57170 Opened 24 years ago Closed 24 years ago

copy/paste text does not carry text attribute

Categories

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

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: ftang, Assigned: mozeditor)

Details

(Whiteboard: [rtm-])

Attachments

(1 file)

I observer this behavior by using my 10/16 branch pull build on window. I think it is very hard to use editor without fix this issue. reproduce procedure: 1. open composer 2. type abcdefghijklmnopqrstuv 3. select abcdefghijklmnopqrstuv 4. make the color to red by select "Format:Text color..." and pick a color (say red) and click OK 5. now abcdefghijklmnopqrstuv is red, which is ok. 6. select cdefg 7. copy 8. move cursor after s 9. paste expect result cdefg paste after s with color red actual result cdefg paste after s with color black. The interesting thing is if you copy the whole text "abcdefghijklmnopqrstuv " and paste, then it will paste as in red.
This not only apply to text color, but text size. Text font is also broken. <b> <I> and <U> is ok but other text style are broken.
Keywords: rtm
this is by design, if you select the entire element content, then you get the content and the element, if you make a partial selection, then you get just the content. Joe has been working on changing this model for some selection points, so I am reassigning this to hime for 1. clarification, 2. disposition
Assignee: beppe → jfrancis
Target Milestone: --- → Future
I could change copy to grab any inline style, not just {b,i,u}. That would be fine with me. I don't know why we decided to use only {b,i,u}.
Status: NEW → ASSIGNED
moz 0.9
Target Milestone: Future → mozilla0.9
setting to rtm -
Whiteboard: [rtm-]
patch attached. need review/sr. akkana? simon?
Whiteboard: [rtm-] → [rtm-] fix in hand; need review
Is it safe to include td and th in IsRoot? Should we possibly rename IsRoot if it means something else? Looks fine aside from that question.
I think we need to think more about copying block-level elements from the parent hierarchy, but those were there already. sr=sfraser
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: [rtm-] fix in hand; need review → [rtm-]
Verified on 8-28 build
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: