Summary: | window.getSelection().toString() is undefined (range object returned from window.getSelection() is useless) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Berndt Jung <berndtj> | ||||||
Component: | HTML Editing | Assignee: | Justin Garcia <justin.garcia> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Major | CC: | ap | ||||||
Priority: | P2 | ||||||||
Version: | 420+ | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.4 | ||||||||
URL: | http://concisity.net | ||||||||
Attachments: |
|
Description
Berndt Jung
2005-08-23 17:40:43 PDT
Created attachment 3542 [details]
test cases
Drag the links to the bookmark bar to test
Nice test case, although interestingly ffx seems to be able to do both mozilla+safari mechanisms for at least one test Actually, window.getSelection() does not return a Range object - it returns a Selection object (with type None, Caret or Range), which doesn't have startContainer <http://developer.mozilla.org/en/docs/ DOM:Selection>. The patch in bug 4904 adds support for getRangeAt, so the "Mozilla" way starts to work. Keeping this bug to track the problem with toString(). Created attachment 5259 [details]
test case
Landing the toString fix. Turns out it was defined as a method on our JS Selection object, but we didn't handle it in Selection::callAsFunction getRangeAt and toString should now behave like they do in FF. |