Bug 23885

Summary: window.getSelection().getRangeAt(0).setEnd will modify the selection in FF
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: jparent, justin.garcia, ojan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   

Eric Seidel (no email)
Reported 2009-02-10 18:17:48 PST
window.getSelection().getRangeAt(0).setEnd will modify the selection in FF I don't think we want to support this. But I'm pointing out here that we differ from FF in this behavior. I will file a bug with FF once I come up with a nice test case (which I will attach here). FF's getRangeAt function returns the same Range objects as were passed into addRange, meaning === returns true when compared with the range object passed into addRange. Moreover, modifying the Range object returned by getRangeAt will modify the selection. I don't know how many sites depend on this behavior (if any). My vote is that we do not support this behavior and that we convince FF to change away from this confusing API, but I'd be very interested in hearing others opinions on the matter.
Attachments
Alexey Proskuryakov
Comment 1 2009-02-11 08:19:40 PST
*** This bug has been marked as a duplicate of 15921 ***
Note You need to log in before you can comment on or make changes to this bug.