electron-input-menu icon indicating copy to clipboard operation
electron-input-menu copied to clipboard

Doesn't work inside <webview>

Open teameh opened this issue 9 years ago • 4 comments

Kind of the same as. https://github.com/parro-it/debug-menu/issues/6 but I'm not able to fix this 😬. How could we fix this, can we get to the DOM in case of a webview ?

teameh avatar Dec 12 '16 14:12 teameh

The popup menu simply uses Electron roles to do copy-paste stuff. I don't know if it handle automatically webviews. Has you tried?

Instead, we could improve the registered shortcuts. We should be able to add an (optional) elm argument to registerShortcuts method. If the user pass some webview as value, it should be forwarded all the way down to action method.

In action method, the webview methods has to be called instead of the current window ones...

parro-it avatar Dec 12 '16 15:12 parro-it

You use the element that's being clicked to see if you should show the menu right? But since because the element is a webview, the right menu items are never showed when clicked on a input inside webview. Try it yourself to get what I mean :)

teameh avatar Dec 12 '16 19:12 teameh

Try it yourself to get what I mean :)

I had... you're right.

parro-it avatar Dec 12 '16 20:12 parro-it

You can put this inside a preload script for the webview and it works.

codezomb avatar Apr 17 '18 20:04 codezomb