Disable Touch support in CEFSharp WPF

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

Disable Touch support in CEFSharp WPF

Postby varuna15 » Tue Mar 29, 2022 2:06 am

We are using the cefsharp wpf in our application. When we use the application from a normal laptop which doesn't support touch, the options of <select> element render in a normal way.

normal.jpg
normal.jpg (6.04 KiB) Viewed 21896 times


But the same application when used from a touch enabled laptop, there is extra padding added to option tag.

touch.jpg
Touch devices
touch.jpg (6.22 KiB) Viewed 21896 times


Is there a way by which i can tell cef to not bother about touch or disable touch support completely. So the rendering is same across devices.
varuna15
Newbie
 
Posts: 3
Joined: Tue Mar 29, 2022 1:58 am

Re: Disable Touch support in CEFSharp WPF

Postby amaitland » Tue Mar 29, 2022 3:54 pm

What research have you done? What have you tried so far?
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: Disable Touch support in CEFSharp WPF

Postby varuna15 » Tue Mar 29, 2022 10:44 pm

I Have used the command line arguments to disable certain touch flags, but none of these has any effect on this behavior.

settings.CefCommandLineArgs.Add("disable-touch-adjustment", "1");
settings.CefCommandLineArgs.Add("top-chrome-touch-ui", "disabled");
settings.CefCommandLineArgs.Add("touch-events", "disabled");
settings.CefCommandLineArgs.Add("touch-devices", "disabled");
settings.SetOffScreenRenderingBestPerformanceArgs();

if I disable the touch in window 10 setting, then rendering is normal and as expected.

Note: I see this issue in 84 version of cef, i created a dummy application with 99 version its working as expected.
Last edited by varuna15 on Wed Mar 30, 2022 1:26 am, edited 1 time in total.
varuna15
Newbie
 
Posts: 3
Joined: Tue Mar 29, 2022 1:58 am

Re: Disable Touch support in CEFSharp WPF

Postby amaitland » Tue Mar 29, 2022 11:24 pm

I've never tried disabling touch, so you'll have to do some research.

How do you disable touch in Chrome? Is it even possible?

If it's possible does disabling touch in Chrome achieves the desired outcome?

.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: Disable Touch support in CEFSharp WPF

Postby amaitland » Tue Mar 29, 2022 11:27 pm

I'd also suggest reviewing the command line arguments in the chromium source, one is Linux only https://source.chromium.org/chromium/ch ... s=chromium

You can look up the rest.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: Disable Touch support in CEFSharp WPF

Postby magreenblatt » Wed Mar 30, 2022 9:55 am

Note: I see this issue in 84 version of cef, i created a dummy application with 99 version its working as expected.

Maybe there were different flags in 84. Since it works for you in 99 maybe you should just upgrade.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Disable Touch support in CEFSharp WPF

Postby varuna15 » Wed Mar 30, 2022 10:28 am

Thank you for your response.

Found that is was a bug in chromium and they have fixed in in latest version. Here is the bug details
https://bugs.chromium.org/p/chromium/is ... tion&can=1
varuna15
Newbie
 
Posts: 3
Joined: Tue Mar 29, 2022 1:58 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 12 guests