Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: WebView clears selection when it resigns first responder



I had this same problem, and I got the behavior you want by overriding - (BOOL) maintainsInactiveSelection on the WebView to return YES. This made it keep a selection (although gray, not the usual blue highlight) even when moving the focus away from the WebView.

-Jing
________________________________________
From: webkitsdk-dev-bounces+a-jiche=email@hidden [webkitsdk-dev-bounces+a-jiche=email@hidden] On Behalf Of Philip Dow [email@hidden]
Sent: Wednesday, January 30, 2008 1:15 PM
To: email@hidden
Subject: WebView clears selection when it resigns first responder

I'm noticing that the default behavior in a web view is to clear the
selection when it resigns first responder. NSTextView does not do
this. Is there a way to prevent this behavior?

I've had a look at the editing delegate method
shouldChangeSelectedDOMRange but as far as I can tell it is not called
when the view resignes first responder even though the selection is
changing.

~Phil




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden

References: 
 >WebView clears selection when it resigns first responder (From: Philip Dow <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.