2

When I click the textbox for data entry on the touch screen, the on-screen keyboard appears and the screen scrolls up smoothly and the entries appear. But when we click on another textbox, the page returns to its original state and the entries remain behind, so we don't see what we entered. This is not a problem when we do this by closing the on-screen keyboard before each textbox click and it scrolls up smoothly.

Note 1: CEF Version: v65.0.1.0.

Note 2: Windows 10 Enterprise 2016 LTSB (version:1607, OS Build: 14393.3085).

Note 3: I switched back from v75 to v65 because the keyboard was closed a few seconds after clicking the textbox. I'm sorry for my bad english.

Note 4: Code:

var settings = new CefSettings();
settings.CefCommandLineArgs.Add("no-proxy-server", "1");
settings.CefCommandLineArgs.Add("touch-events", "enabled");
settings.CefCommandLineArgs.Add("disable-usb-keyboard-detect", "1"); 
settings.CefCommandLineArgs.Add("enable-media-stream", "1");
settings.MultiThreadedMessageLoop = true;

var boundObject = new BoundObject();

Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);

Control.CheckForIllegalCrossThreadCalls = false;
CefSharpSettings.LegacyJavascriptBindingEnabled = true;
chromiumWebBrowser1.MenuHandler = new MyCustomMenuHandler();
var eventObject = new ScriptedMethodsBoundObject();
eventObject.EventArrived += OnJavascriptEventArrived;
chromiumWebBrowser1.RegisterJsObject("boundEvent", eventObject, options: BindingOptions.DefaultBinder);
ckrby
  • 21
  • 1
  • 5
  • Version 65 is old and unsupported. Version 75 is the current version, try using the following command line arg. https://peter.sh/experiments/chromium-command-line-switches/#disable-usb-keyboard-detect – amaitland Nov 05 '19 at 11:23
  • First of all thanks for the reply @amaitland. I tried that way in v75, but the problem wasn't solved, is there something I've done wrong? var settings = new CefSettings(); settings.CefCommandLineArgs.Add("no-proxy-server", "1"); settings.CefCommandLineArgs.Add("touch-events", "enabled"); settings.CefCommandLineArgs.Add("disable-usb-keyboard-detect", "1"); Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null); – ckrby Nov 05 '19 at 12:22
  • When i click the textbox in v75, the on-screen keyboard opens but closes after 2-3 seconds. Even if I am entering data, it goes automatically in a short time. However, the keyboard does not close as long as different textboxes are clicked. I hope I made myself clear. – ckrby Nov 05 '19 at 12:40
  • 1
    It's a known CEF issue see https://bitbucket.org/chromiumembedded/cef/issues/2620 instead of posting code as a comment edit the original question. Please also include the version of windows you are using. Try a much newer version like 71 or 73 – amaitland Nov 05 '19 at 18:59
  • I tried these versions (v75.1.143; v73.1.130; , v71.0.2), after you said it, but the problem still continues. Thanks again for your interest @amaitland – ckrby Nov 08 '19 at 08:40
  • `75.1.143` works as expected on `Windows 10 1903` on my `Surface Pro` first generation, keyboard works nicely. You are using an incredibly outdated version of windows, that might be half the problem. – amaitland Nov 08 '19 at 09:27
  • I updated my computer's operating system to Windows 10 Enterprise LTSC (Version 1809, Build 17763.864). Then I used the CefSharp v75.1.143. The problem with the on-screen keyboard disappearing after 2-3 seconds has been fixed. However, when we click on the textbox, the problem continues to be that the keyboard reaches the top and prevents the entries from being seen:( Even when I click on the textbox, the page doesn't scroll up and the keyboard always stays on top. – ckrby Nov 13 '19 at 10:54
  • Please test with https://github.com/cefsharp/CefSharp.MinimalExample this is generally what I use for testing – amaitland Nov 13 '19 at 22:46
  • First of all, thanks again for your interest and effort to help. I tried the MinimalExample, but I ran into the same problem. However, when I try with Chrome, the page scrolls up smoothly and the keyboard stays below the textboxes and the entries are properly visible. In addition, I encountered a problem: Although I clicked on the textbox, the cursor is where I am last (which button I pressed or on the address line) and there is no entry to the textbox. To make it more understandable, I took a video with both errors and shared it: https://streamable.com/r8byf – ckrby Nov 14 '19 at 08:47
  • NOTE: The last error is not important for me because there is no such problem in my application, but I wrote for information. It's a big problem for me that the on-screen keyboard blocks the appearance of the inputs. – ckrby Nov 14 '19 at 08:48
  • Download http://opensource.spotify.com/cefbuilds/cef_binary_78.3.1%2Bg8819d2e%2Bchromium-78.0.3904.87_windows64_client.tar.bz2 and test with the `CEF Sample application (cefclient)`, if you can reproduce the problem then you should report your findings on https://bitbucket.org/chromiumembedded/cef/issues/2646/branch-version-3683-does-not-support `CefSharp` is just a wrapper, touchscreen support is implemented in `CEF/Chromium`. – amaitland Nov 14 '19 at 22:40
  • Thank you very much for your valued support @amaitland, I will try. – ckrby Nov 15 '19 at 06:24
  • @ckrby I have a similar problem, did you get it to work? – Nabster Mar 03 '20 at 05:31
  • 1
    @Nabster, Unfortunately, I couldn't find the solution in the new current version (v75). I was able to fix this issue in v67. In addition, the LTSC version also causes the keyboard to shut down after 2-3 seconds. To summarize, Cefsharp v67 and Windows 10 LTSB. Note: The version names have changed, the version of version v67 has become 3.3396.1786. Note2: New stable version (v79) has been released, I have not tried this version. – ckrby Mar 04 '20 at 06:31
  • @ckrby, Thank you for your reply. Sorry I didn't realize that your environment is WinForms. Just FYI, Mine is WPF, I have finally got it work by setting 3 flags (touch-events, disable-usb-keyboard-detect, enable-touchview) and using the KeyboardTochEventManager sample solution. It works fine on windows 10 1909 where the application window resizes based on keyboard but not on 1809. this answer helped me a lot: https://stackoverflow.com/a/59875794/10224384 – Nabster Mar 04 '20 at 09:24
  • Thank you very much for your information/feedback and interest @Nabster... – ckrby Mar 05 '20 at 10:33

0 Answers0