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: Getting events to an embedded WebView...




On Oct 3, 2005, at 2:34 AM, Troy Dawson wrote:

I'm working on a Cocoa app with an embedded WebView, and in the WebView I've got a Canvas region.

The _javascript_ is using:

    window.addEventListener('keydown',doKeyDown,true)

and this works fine in Safari, but requires a mouseclick to start working in a WebView.

Overriding the window's sendEvent, I see when keys aren't working the firstResponder is my WebView, and when the eventListener is getting keys (after a click) the firstResponder has become the WebView's WebHTMLView.

How can I get keys without the click? This is 10.4.2.

ah, cool. Deferring showing the window until here:

- (void) webView: (WebView*) sender didFinishLoadForFrame: (WebFrame*) frame
{
    [[self window] makeKeyAndOrderFront: self];
}

fixed the problem. I'll file a radar on this today.

 _______________________________________________
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: 
 >Getting events to an embedded WebView... (From: Troy Dawson <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.