Closed
Bug 105487
Opened 23 years ago
Closed 23 years ago
When copying and pasting text with different text styles (bold, italic, or underline) in composer, the spaces inbetween the different styles is lost.
Categories
(SeaMonkey :: Composer, defect)
SeaMonkey
Composer
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: dslmichael, Assigned: mozeditor)
References
Details
(Whiteboard: EDITORBASE; fixinhand; need r=)
Attachments
(1 file)
1.46 KB,
patch
|
kinmoz
:
superreview+
|
Details | Diff | Splinter Review |
Spaces are lost when copying and pasting text that has different text styles in it. Steps to Reproduce: 1.Open composer 2.Type "This sentance is going to lose some spaces." 3.Highlight the first two words (This sentance) and make them bold 4.Highlight the next two words (is going) and make them italic 5.Highlight the next two words (to lose) and make them underline 6.Highlight the whole selection, and copy it to the clipboard (Ctrl+C) 7.Deselect the text, and hit enter twice to get you to a new line 8.Paste the text (Ctrl+V) Actual results: The spaces inbetween where the text style changed are gone. Expected results: The text should appear exactly as it appeared before it was copied. The only way to get it to copy over as it appears is to make sure when you highlight the words, you also highlight the space inbetween the last word of the first style and the first word of the next style. Otherwise the space is not within the bold italic or underline tags, and gets lost. Reproduced on Win XP, Win 98, and Mac OSX all using build 20011017.
Comment 1•23 years ago
|
||
-->serializer
Assignee: syd → harishd
Component: Editor: Composer → DOM to Text Conversion
Whiteboard: EDITORBASE
Reporter | ||
Comment 3•23 years ago
|
||
*** Bug 105772 has been marked as a duplicate of this bug. ***
Comment 4•23 years ago
|
||
In build # 2001121003 This is still happening.
Comment 5•23 years ago
|
||
Confirming based on the dupe and recent comment.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•23 years ago
|
||
I don't see it happening in Serializer. It seems that in the copy process nodes (specially with white spaces) are properly retained and problem occurs while pasting in "Editor" somewhere. Also content is getting pasted properly on notepad, where PlainTextSerializer comes into picture. Would someone please verify it and assign it to the right person !
Comment 7•23 years ago
|
||
If it's not happening in the html serializer, then it's probably either edit rules or copy encoding, both of which would be Joe ...
Assignee | ||
Comment 8•23 years ago
|
||
snarfing bug. 099
Assignee: peterv → jfrancis
Target Milestone: --- → mozilla0.9.9
Assignee | ||
Comment 9•23 years ago
|
||
uhh, this is worksforme folks. followed instructions exactly.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Reporter | ||
Comment 10•23 years ago
|
||
I am still seeing this problem on Win ME using trunk build 2002020908. One thing I might not have been clear on is that in steps 3 - 5 you have to make sure not to highlight the spaces inbetween the words. So the HTML created by the first 5 steps will look like the selection below. And then when you copy and paste the text, the whitespace between the tags is deleted. Original HTML: <b>This sentance</b> <i>is going</i> <u>to lose</u> some spaces. Which gets pasted as: <b>This sentance</b><i>is going</i><u>to lose</u> some spaces. I am reopening this bug.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Assignee | ||
Comment 11•23 years ago
|
||
ok. i believe you, but I really did follow the directions :-) I have some changes in my tree, maybe they fixed this (although that seems unlikely). I'll investigate some more...
Comment 12•23 years ago
|
||
I'm also able to reproduce it with Feb 11'02 build on Windows 98 and NT.
Comment 13•23 years ago
|
||
Component-->Editor:Composer
Component: DOM to Text Conversion → Editor: Composer
Assignee | ||
Comment 14•23 years ago
|
||
this should do the trick.
Assignee | ||
Updated•23 years ago
|
Whiteboard: EDITORBASE → EDITORBASE; fixinhand; need r=, sr=
Comment 15•23 years ago
|
||
Comment on attachment 69449 [details] [diff] [review] patch for editor/libeditor/html/nsHTMLDataTransfer.cpp sr=kin@netscape.com Do you know why we were stripping formatting nodes in the first place? If it really is necessary, perhaps the strip formatting nodes method needs to be more savvy to context like the WSRunObject?
Attachment #69449 -
Flags: superreview+
Whiteboard: EDITORBASE; fixinhand; need r=, sr= → EDITORBASE; fixinhand; need r=
Assignee | ||
Comment 16•23 years ago
|
||
Kin, I thought long about why I might have done that. I believe that I had to add it for the contextual fragment that I build in that same routine. Otherwise the serializer might have put in some whitespace, which then breaks my assumption that the dom we get back from it is a straight parent-child chain from top to bottom. I could come up with no reason why I shold have to strip it for the regualr html stream, though, so I took it out. I played around some with pasting parts of tables during testing and didnt have any trouble. I guess i should expirement with list item pasting as well. I didn't put a comment with the stripping, which leads me to think that it was on a whim rather than for a good reason.
Assignee | ||
Comment 17•23 years ago
|
||
fixed on tip
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 18•23 years ago
|
||
Verified on Mac OS9 and Win XP using teh 02-20 trunk builds.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•