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 loosing first-responder



Thanks John,
I was afraid it would be something like this. This is pretty close tho the first approach I tried, but the problem I ran into is that it doesn't distinguish between webview loads that are initiated through clicking on links and those that are sent to the webview from another object.


Specifically, I have a tableview containing objects that can be selected causing the webView to load data. While the user is using the table, I need to maintain its first responder status so they can arrow up and down the rows (this is the default behavior of course), but when the user navigates with the webView by clicking on links I would like the webView to remain the first responder. Making the documentView the first responder with didCommitLoadForFrame works great if it is the only thing going on--like safari.

Most other appkit objects behave the way I would like the webkit to, and I don't really understand why it releases the first responder with every frame load or how to prevent it.

Thanks

Mark



On Apr 20, 2005, at 3:20 PM, John Sullivan wrote:

Safari addresses this as follows (simplified):

In the WebView's delegate methodĀ -webView:didCommitLoadForFrame:, callĀ 

[window makeFirstResponder:[[[webView mainFrame] frameView] documentView]]

John


On Apr 20, 2005, at 2:37 PM, email@hidden wrote:

This has been bugging me for a while and I can't seem to find the answer.

I have a webview, which when I click on it acts as it should. If I use the arrows it scrolls up and down as would be expected. Now if I click on a link in the webview it seems to loose the first responder once the new page loads--now scrolling with the arrows just beeps. If I want to use the keyboard to scroll, I need to click on the webview again. I feel like I'm misunderstanding something basic. How do you keep the webview focused while navigating?

Thanks

_______________________________________________
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 loosing first-responder (From: email@hidden)
 >Re: Webview loosing first-responder (From: John Sullivan <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.