Bug 3489

Summary: WebView's setSelectedDOMRange doesn't not implement clearing selection
Product: WebKit Reporter: Sarwat Khan <bugzilla>
Component: New BugsAssignee: Anders Carlsson <andersca>
Severity: Major    
Priority: P2    
Version: 412   
Hardware: Mac   
OS: OS X 10.4   
URL: http://developer.apple.com/documentation/Cocoa/Reference/WebKit/ObjC_classic/Classes/WebView.html#//apple_ref/doc/uid/20001903-BABCIJGA
Description Flags
Call deselectText if range is nil darin: review+

Description Sarwat Khan 2005-06-12 18:47:22 PDT
The documentation describes setSelectedDOMRange:affinity: with the following,

    Selects the range specified by range in the receiver. If range is nil, clears the selection. 

However, the method is implemented with this line,
    [[[range startContainer] _bridge] setSelectedDOMRange:range affinity:selectionAffinity closeTyping:YES];

Where 'range' is the given parameter. If 'range' is nil, this line is a no-op.
Comment 1 David Kilzer (:ddkilzer) 2005-06-19 12:50:30 PDT
See WebKit/WebView.subproj/WebView.m revision 1.287 line 2770 for the actual implementation.

Either the documentation needs to be updated, or the method needs to be fixed to adhere to the 
Comment 2 Anders Carlsson 2005-06-25 01:45:47 PDT
Created attachment 2638 [details]
Call deselectText if range is nil
Comment 3 Darin Adler 2005-06-26 16:48:56 PDT
Comment on attachment 2638 [details]
Call deselectText if range is nil

Comment 4 Joost de Valk (AlthA) 2005-07-03 07:59:29 PDT
Reportere, could you verify this one? If it's fixed for you, mark it as verified please.