开发者

WebView in Cocoa not accepting keystrokes?

开发者 https://www.devze.com 2023-02-04 08:35 出处:网络
I\'m working on embedding a WebView in Cocoa. I have the basic view up and running, but the problem I\'m facing is when I type using either the keyboard or the on-screen keyboard, I get a beep from my

I'm working on embedding a WebView in Cocoa. I have the basic view up and running, but the problem I'm facing is when I type using either the keyboard or the on-screen keyboard, I get a beep from my Mac and none of the characters are actually sh开发者_如何学Pythonown in the Web view's text field.

I've been going through the web view's reference guide from Apple, but couldn't find anything related to this.

Any help is much appreciated!

Thanks,

Teja.


Omz's comment solved the issue for me. I changed my NSWindow styleMask to a style that can become a key window:

window.styleMask = NSTitledWindowMask
0

精彩评论

暂无评论...
验证码 换一张
取 消