-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
cefSharp wpf Keyboard input do not appear in the browser. #362
Comments
No questions asked 😄 Which CefSharp version do you see this with? |
Version 3.29.0.0 - I just finished the minimal example - how do I send? |
Also reproducible with 3.1650 |
Do you mean on a source build from ... OK, so I guess we either have a bug which can affect general Wpf use - or maybe a bug introduced by the WinForms wrapping - the way you have done it - or in general. It is something we currently don't have an example of doing in the project. But - as your case illustrates - is a valid case for some people, hence my interest in it (apart from that we want to help you succeed :-)
Preferably put your sources up here on GitHub or alternatively I guess you could dump it into a zip and post it e.g. in the CefSharp Google group. |
Thanks - I'd like to succeed too! I just downloaded the code from CefSharp-master. |
Sorry @JPipe I'm out of steam for today ... will have a look within the next few days though. @amaitland if you have got the time/interest in this you're welcome to take a peek. |
I understand, and thanks for keeping me posted - sounds like a post memorial day thing :-) |
@JPipe Thanks for the example, looking at this now |
I'm able to reproduce the issue, it looks isolated to Wrapping the WPF control in a WinForms host. |
Thanks - I appreciate. I'm still looking at it myself. |
For reference I've taken the example you provided, made a few changes and made it available here https://github.com/amaitland/CefSharp/tree/bug/wpf-hosted-in-winforms In the short term are you able to open your WPF Window as a modal Dialog? That should get around the issue. First though is that it'll be something to do with the message loop being shared between WinForms and WPF. MSDN - Sharing Message Loops Between Win32 and WPF Example of |
Thanks @amaitland I'm trying it out...The app is a bit of a monster, and I'm not sure if going model will have some downstream impact. |
Hi, I'm making some progress, but now when I try to EvaluateScript To get the browser content, I use EvaluateScript(@"document.documentElement.outerHTML"); that worked OK (no longer does) and since I'm not knowingly binding to anything, I just don't know were to increase the MaxReceivedMessageSize property. any idea how to get passed this one, or even better is there a method that will give me the page content. |
@perlun it seems we have to boost the binding parameters a bit / should we provide the user of cefsharp some kind of api to configure the binding themselves ? @JPipe cef 3 uses wcf to communicate with a subprocess that isolates the browser that wasnt in place with cef 1.0. and that wcf communication has some limits if used in default config. the dom of your page seems to use more than 64KB |
Thanks - an API would be nice. What shall I do in the mean time? |
An API for this seems overkill to me. Let's change the fixed limit to 16 megabytes or something like that instead. Sent from my iPhone On 22 maj 2014, at 23:30, "JanEggers" <[email protected]mailto:[email protected]> wrote: @perlunhttps://github.com/perlun it seems we have to boost the binding parameters a bit / should we provide the user of cefsharp some kind of api to configure the binding themselves ? @JPipehttps://github.com/JPipe cef 3 uses wcf to communicate with a subprocess that isolates the browser that wasnt in place with cef 1.0. and that wcf communication has some limits if used in default config. the dom of your page seems to use more than 64KB Reply to this email directly or view it on GitHubhttps://github.com//issues/362#issuecomment-43940090. |
Works for me - Let me know when available) |
Just to keep the ball rolling (so I can continue with the cefSharp integration) - is there any timeline for both issue resolution (WinForm Hosting WPF lost keystrokes & EvaluateScript)? Thanks, Jan |
@JPipe When calling |
Yes - that will work in the short term, but I will also have to support JS and the possibility of having large JS return object still exist... PS: can you clarify short Term. Thanks, Jan |
The basic plumbing for As for changing Both changes are on my WIP branch and aren't ready for prime time just yet (there are also a large number of other changes on that branch, mostly just code cleanup and restructuring stuff). If your game, you could checkout that branch and build it locally. |
It sounds like GetSource should return a Task then, I guess. Sent from my iPhone On 28 maj 2014, at 06:28, "amaitland" <[email protected]mailto:[email protected]> wrote: The basic plumbing for GetSource() is relatively straight forward, I've got the basics implemented here amaitland/CefSharp@8879e41amaitland@8879e41. I'm still pondering how best to expose that in the WebView class, the call is actually executed in an async fashion, so ideally we wrap that in a nice way. As for changing MaxReceivedMessageSize I haven't had a chance to test it as yet, though the change will look something like this amaitland/CefSharp@85ef366amaitland@85ef366 Both changes are on my WIP branch and aren't ready for prime time just yet (there are also a large number of other changes on that branch, mostly just code cleanup and restructuring stuff). If your game, you could checkout that branch and build it locally. Reply to this email directly or view it on GitHubhttps://github.com//issues/362#issuecomment-44362051. |
@perlun returning Thoughts? |
I have to say that from a user point of view, getting the string back with one call requiring no callback is more appealing. |
@amaitland - Thanks I increased the MaxReceivedMessageSize binding but kept the ChannelFactory rather than moving to the duplex model (keeping the changes to a minimum for now) since it looks like some serious re-factoring is taken place... and it works! |
@JPipe Thanks for the feedback, once the technical implementation is ironed out, it's only a couple of lines to implement a synchronous implementation of If you have a min set of changes that resolves |
@amaitland - any instructions on how to generate a pull request? |
Basic steps are something like this
It's also worth having a quick read over https://github.com/cefsharp/CefSharp/blob/master/CONTRIBUTING.md to get a sense of coding style, biggest one to note is spaces instead of tabs also for C++ which is not the default VStudio setting when starting out. Reference articles that maybe of help
Git Clients worth considering The GitHub windows client is probably the simplest interface, I started using it, though quickly moved away once I got more comfortable with Git. Their website has reasonable help, and it tightly integrates with GitHub of course.
Let me know how you go or if you require more info. |
@JPipe Was that info helpful? I was thinking it might be worth creating a wiki item for future reference. |
@amaitland That's not a bad idea, though I am still trying to work my way On Thu, May 29, 2014 at 3:04 PM, amaitland [email protected] wrote:
Jan Piper |
If you go to https://github.com/JPipe/CefSharp, click on "Settings" on the right hand side, scroll down that page and you should see the option to delete the repository. Once you've done that, you can fork the main CefSharp repository 😄 If you have any suggestions for the wiki page any contribution would be greatly appreciated! |
@amaitland - I just committed the changes for the max object size net pipe On Thu, May 29, 2014 at 4:06 PM, amaitland [email protected] wrote:
Jan Piper |
@JPipe Thanks! Is there any urgency with this change? There is a major restructure happening related to JS Bindings, so I was going to see about bundling this change into those. |
No Rush, I have included that code in my local build. On another note, I am On Mon, Jun 2, 2014 at 7:31 PM, amaitland [email protected] wrote:
Jan Piper |
@JPipe, are you using non-standard DPI (i.e. not 100%)? |
Anyway, that seems like another issue so maybe we would be better off closing this one. |
Closing issue due to inactivity, feel free to reopen if required. |
I am currently experiencing the same issue that @JPipe was experiencing. Is there any way to get the this to work using ElementHost.EnableModelessKeyboardInterop instead of ShowDialog. One of our requirements for our application is to not show the WPF portion of our applciation as a dialog. This is causing a major roadblock for us. Thanks! |
I am facing this issue too. Opening a Wpf Window inside Winforms, not able to send any keystores to wpf window. I can't make it a Modal dialog due to requirement of application. |
I have a winform app hosting a wpf form in which the cef browser is added (don't ask this is a legacy product...) .
I am able to navigate, evaluate script, but cannot get the the keyboard input to appear in the browser.
Running in the debugger, I can see the keystrokesprocessed by the CefSharp.wpf WebView event (OnPreviewKey & SourceHook), but never seem to make it to the browser UI.
Other keys such as tabs & arrow keys navigate fine in the browser but no characters seems to make it into the UI.
It's almost as if the key is being processed correctly, but is sent to the wrong destination.
Can anyone help?
Thanks,
Jan
The text was updated successfully, but these errors were encountered: