Bug 3489 - WebView's setSelectedDOMRange doesn't not implement clearing selection
Summary: WebView's setSelectedDOMRange doesn't not implement clearing selection
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P2 Major
Assignee: Anders Carlsson
URL: http://developer.apple.com/documentat...
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-12 18:47 PDT by Sarwat Khan
Modified: 2005-07-03 07:59 PDT (History)
0 users

See Also:


Attachments
Call deselectText if range is nil (1.85 KB, patch)
2005-06-25 01:45 PDT, Anders Carlsson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sarwat Khan 2005-06-12 18:47:22 PDT
The documentation describes setSelectedDOMRange:affinity: with the following,

WebKit/ObjC_classic/Classes/WebView.html:
    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 
documentation.
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

r=me
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.