Bug 128084 - WK2: Selection in non editable content is not cleared when navigating to a different page
Summary: WK2: Selection in non editable content is not cleared when navigating to a di...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-02-02 15:07 PST by Enrica Casucci
Modified: 2014-02-02 15:41 PST (History)
1 user (show)

See Also:


Attachments
Patch (1.28 KB, patch)
2014-02-02 15:11 PST, Enrica Casucci
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2014-02-02 15:07:44 PST
We need to make sure the selection code knows that we are resigning first responder.

<rdar://problem/15966166>
Comment 1 Enrica Casucci 2014-02-02 15:11:31 PST
Created attachment 222941 [details]
Patch
Comment 2 mitz 2014-02-02 15:24:05 PST
Comment on attachment 222941 [details]
Patch

Conceptually it seems wrong to do any work in our override of resignFirstResponder if the superclass implementation is going to return NO. Should we call super first and bail out if it returned NO?

This is not new to this patch, however, so r=me.
Comment 3 Enrica Casucci 2014-02-02 15:35:44 PST
(In reply to comment #2)
> (From update of attachment 222941 [details])
> Conceptually it seems wrong to do any work in our override of resignFirstResponder if the superclass implementation is going to return NO. Should we call super first and bail out if it returned NO?
> 
> This is not new to this patch, however, so r=me.

Thanks for the review!
You are probably correct about calling the super class first. I checked the implementation in UIWebDocumentview and there are tasks performed before and other performed after calling [super resignFirstResponder] but no checks are performed on the return value.
I will leave it like this for now, but I'll add a comment before landing to remind me to do further investigation.
Comment 4 Enrica Casucci 2014-02-02 15:41:31 PST
Committed revision 163273.