-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input fields not accepting keyboard events #131
Comments
It's likely an issue with the toolbar, the first thing that comes to mind is that either the webview or toolbar are overlapping each other in IB which can sometimes cause issues like that because one is intercepting the events meant for another. If you've changed other code under the hood, then it's almost impossible to give you a helpful answer without seeing what has changed or what you've implemented. If you can post a link to the project repo I can take a look if you'd like. |
Hmm, so this is embarrassing. Your comment made me take another look at the project in interface builder to see if there was some sort of stacking/overlapping issue, but nothing came up. Then I decided to open a fresh MacGap app and copy everything over one-by-one to see if I could isolate the issue (which I've already tried several times). Turns out in my CSS I had the following: * {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-webkit-user-select: none;
-webkit-user-drag: none;
cursor: default;
} That @rawcreative - thanks for offering to help anyway - much appreciated. |
@brycecammo — any chance you'd be willing to do a quick write-up in the wiki on how to implement an NSToolbar in MacGap? Even just the fundamentals and a few screenshots would do the trick. I've been meaning to do this but haven't had a chance as yet. Did you use the User Defaults to provide communication between the toolbar items and JavaScript? |
@jeff-h – I'd be happy to. I needed to send some other information from the native code to Javascript, so I used https://github.com/marcuswestin/WebViewJavascriptBridge to send toolbar events to the app. |
By the way, this could be an interesting thing for MacGap2. I don't know how toolbar works with Cocoa, but I guess that they can be registered after the window is drawn (not like this). |
I'd really like to get a page on implementing your own toolbar into the MG2 docs. I feel like it would be silly to try to programmatically create a toolbar from inside MG2, since Interface Builder already provides a very comprehensive UI for creating everything imaginable in a toolbar. I think connecting everything together is where it gets tricky. |
I'm having some trouble with my MacGap application, and no amount of Googling has been able to solve it. The problem is I cannot type inside the web view. I can focus on HTML
<input/>
fields and click buttons, etc, but when trying to type it just makes that ‘doh’ sound & no text is entered into the field. I'm using XCode v 5.1.1 on 10.9.I've added an NSToolbar above the main WebView window if it makes any difference.
When comparing my application to a fresh MacGap app (which works fine) I can't identify anything different that may be causing the issue.
Any ideas on where I should be looking to identify the problem would be greatly appreciated.
The text was updated successfully, but these errors were encountered: