Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

How to activate right click menu to copy or paste menu in devtools.

coater
Posts: 210
Joined: Sat Sep 29, 2018 1:51 pm

How to activate right click menu to copy or paste menu in devtools.

Post by coater »

How to activate right click menu to copy or paste menu in devtools. Now I can only use ctrl+ C or V, thank you!
coater
Posts: 210
Joined: Sat Sep 29, 2018 1:51 pm

Re: How to activate right click menu to copy or paste menu in devtools.

Post by coater »

when I right click on devtools, there is no menu to copy or paste text just like chrom.
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to activate right click menu to copy or paste menu in devtools.

Post by salvadordf »

Chromium decides what elements are present in the context menu initially.
coater
Posts: 210
Joined: Sat Sep 29, 2018 1:51 pm

Re: How to activate right click menu to copy or paste menu in devtools.

Post by coater »

If I select text in devtools, I click my right mouse button, there is no menu for copy or paste

but chrome does!
You do not have the required permissions to view the files attached to this post.
coater
Posts: 210
Joined: Sat Sep 29, 2018 1:51 pm

Re: How to activate right click menu to copy or paste menu in devtools.

Post by coater »

may you help me, thank you!
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to activate right click menu to copy or paste menu in devtools.

Post by salvadordf »

The CEF framework doesn't hide context menu elements. Chromium does.
coater
Posts: 210
Joined: Sat Sep 29, 2018 1:51 pm

Re: How to activate right click menu to copy or paste menu in devtools.

Post by coater »

How to show context menu in devtools, thank you!
User avatar
salvadordf
Posts: 4620
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to activate right click menu to copy or paste menu in devtools.

Post by salvadordf »

Try simulating mouse events with TChromiumCore.SimulateMouseEvent
https://github.com/salvadordf/CEF4Delphi/blob/a87256405aa349d6c4c13e1a5d0ce0e0f31d2d97/source/uCEFChromiumCore.pas#L965

That procedure uses the "Input.dispatchMouseEvent" DevTools method internally :
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-dispatchMouseEvent
coater
Posts: 210
Joined: Sat Sep 29, 2018 1:51 pm

Re: How to activate right click menu to copy or paste menu in devtools.

Post by coater »

chrom will show right menu for copy and paste
this doesn't show anything by right click
You do not have the required permissions to view the files attached to this post.
coater
Posts: 210
Joined: Sat Sep 29, 2018 1:51 pm

Re: How to activate right click menu to copy or paste menu in devtools.

Post by coater »

I didn't simulate mouse events but manual right click in devtools. When a text was selected and after right mouse click, chrome will show menu with copy, past, and so on, but my application will not. How to deal with this? Thank you!
Post Reply