WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
16196
Pasted content appears at the end of the document instead where the caret was
https://bugs.webkit.org/show_bug.cgi?id=16196
Summary
Pasted content appears at the end of the document instead where the caret was
Matt Lilek
Reported
2007-11-29 19:06:27 PST
Go to Blogger and create a new entry. Try pasting anything into the rich text editor - it will appear outside the edit area and isn't posted or saved.
Attachments
Add attachment
proposed patch, testcase, etc.
Justin Garcia
Comment 1
2007-11-30 12:54:43 PST
The caret moves to an editable region before just before the Paste is performed. This also happens *just by opening the Edit menu*. Looking into this...
Justin Garcia
Comment 2
2007-11-30 13:02:49 PST
Their code is focusing a div at the end of the document just before paste time and when the Edit menu is opened.
Justin Garcia
Comment 3
2007-11-30 13:14:13 PST
According to ...-richedit.common.js Blogger intentionally first pastes the content into a div at the bottom of the document, in an attempt to workaround bugs in IE's URL autocompletion. Two problems occur, one, the div is intended to be hidden and its not (in Safari) and the content is never brought over to the original insertion position, inside the editable iframe.
Justin Garcia
Comment 4
2007-11-30 13:15:19 PST
Also, the fact that the div at the bottom of the document is focused when the Edit menu opens leads me to believe that onbeforepaste might be called when the Edit menu is opened, which would be a bug.
Justin Garcia
Comment 5
2007-11-30 13:15:45 PST
(onbeforepaste is where Blogger focuses the hidden div)
Justin Garcia
Comment 6
2007-11-30 13:56:20 PST
Looks like we fail to insert the content because we don't support Range::pasteHTML. Mozilla doesn't either, but they don't get to this point because they don't support onbeforepaste. Looks like the Blogger code just assumes that the browser is IE if it supports onbeforepaste...
Justin Garcia
Comment 7
2007-11-30 17:39:36 PST
We could fix this bug by supporting Range::select and Range::pasteHTML, but then we would look even more like IE, do we want to add support for these methods, or ask Blogger to change their code?
Justin Garcia
Comment 8
2007-11-30 17:53:30 PST
(In reply to
comment #7
)
> We could fix this bug by supporting Range::select and Range::pasteHTML, but > then we would look even more like IE, do we want to add support for these > methods, or ask Blogger to change their code?
Range::pasteHTML isn't exactly an equivalent to document.execCommand("InsertHTML", ...), since it doesn't require a selection, so it would probably be useful to add support for. I think we should add it.
Justin Garcia
Comment 9
2007-12-04 14:42:29 PST
These are actually TextRange methods, not Range methods.
David Harrison
Comment 10
2007-12-04 15:39:24 PST
rdar://5559595
Eric Seidel (no email)
Comment 11
2008-05-20 18:20:38 PDT
This only seems to affect Mac Safari. Safari 3.1 on windows does not seem to hit this bug, assuming I'm testing correctly.
Julie Parent
Comment 12
2008-06-26 18:37:51 PDT
We *just* launched a new editor on draft.blogger.com (You'll see a different toolbar if you are getting the new version). This bug should be fixed with the new editor and will go to regular blogger.com soon.
Jubal Kessler
Comment 13
2008-10-30 08:26:01 PDT
Looking forward to "soon". Tried draft.blogger.com and it seems to work.
Maciej Stachowiak
Comment 14
2008-11-04 12:16:05 PST
Closing as INVALID since this turned out to be a Google bug and was fixed on that end.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug