How to enable mobile-style text selection?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Re: How to enable mobile-style text selection?

Postby magreenblatt » Tue Nov 09, 2021 3:35 pm

You are using OSR, so you should compare to "cefclient --off-screen-rendering-enabled".
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: How to enable mobile-style text selection?

Postby badkins79 » Mon Nov 15, 2021 2:22 pm

amaitland wrote:Did you test with cefclient --off-screen-rendering-enabled to confirm it works with OSR?


Yes, just tested that, and it works the same way. I can't imagine what I could be doing differently in my app to explain why it doesn't work. We are just passing though the touch events via SendTouchEvent().
badkins79
Newbie
 
Posts: 8
Joined: Mon Nov 01, 2021 12:50 pm

Re: How to enable mobile-style text selection?

Postby badkins79 » Tue Feb 01, 2022 11:59 am

Ok, I was finally able to test this using real hardware. I downloaded the linux64 spotify build linked earlier, but it did not contain cefclient, only cefsimple. So I tested with cefsimple, and this is what I saw...

When I long clicked a word, it did select that word. The selection that appeared DID have the little blue thumb balloons on each side. It also had a mobile style popup menu that appeared above the selected word that just had an option to copy. However, I could not find a way to drag the selection area. If I tried to use one finger to drag one of the balloons, or just one of the edges of the selection, it would just scroll the page instead. If I tried to use 2 fingers to drag both sides of the selection at the same time, then it just zoomed the page. If I tried to use the mouse to grab one of the balloons to drag it, as soon as I moved the mouse, the balloons and the popup menu would disappear.

So it appears like this SHOULD work, but it just doesn't. Perhaps a bug?

Also, I tried this running cefsimple with no args, and also with --off-screen-rendering-enabled, and saw the exact same behavior, but I'm not sure if cefsimple even supports that arg. Not sure why the spotify builds did not include cefclient.
badkins79
Newbie
 
Posts: 8
Joined: Mon Nov 01, 2021 12:50 pm

Re: How to enable mobile-style text selection?

Postby magreenblatt » Tue Feb 01, 2022 12:50 pm

Off-screen rendering is not demoed in cefsimple. You can build cefclient from the "Standard Distribution" download.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Previous

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 86 guests