Welcome Guest Search | Active Topics | Sign In | Register

Disable / Override Paste Options
Terri
Posted: Monday, February 22, 2016 4:16:18 PM
Rank: Newbie
Groups: Member

Joined: 10/8/2015
Posts: 3
Essential Objects Web Browser seems to have an automatic paste command underneath the hood.

I'd like to override this automatic paste entirely as for certain clipboard content we want to modify the data before it is actually pasted into the webpage. We are doing this to try to upload images to a server so they can be read after pasting.

Is there a way we can disable the automatic paste in order to allow us to do this?

We still invoke the past command using the WebControl.WebView.ExecCommand(CommandIds.Paste);

I figured that there would be a way to do this already, I found the AutoProcessCmdKeys property, and tried to set it to both true and false explicitly, but neither of these appeared to disable the paste command.

I also had tried Previewing key presses and handling them, but as expected this doesn't work.
We can implement the KeyDown handler on WebView, but this still doesn't seem to give us a way to disable the existing Paste HotKey.

If I remove all Key handlers and don't call CommandIds.Paste in any way, with AutoProcessCmdKeys set to false or true, paste still occurs.
eo_support
Posted: Monday, February 22, 2016 4:26:10 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

Thanks for posting in the forum. I do not believe that is possible in the current version.

A paste command can be triggered in a lot of ways. It can be triggerred by built-in hot keys as well as from JavaScript. A page may have JavaScript code that responds to keyboard events and then trigger paste. You will not be able to intercept those paste operations by intercepting keyboard events. Further more, the keyboard events that entered into the browser actually would NOT go through your host application's event queue because the actual browser engine runs in a child process instead of inside your own process. So unless the browser engine explicitly exposes a way for you to filter the paste content, there is no way for you to do that. Sorry about it!

Thanks
Terri
Posted: Tuesday, February 23, 2016 8:05:52 AM
Rank: Newbie
Groups: Member

Joined: 10/8/2015
Posts: 3
There must be a way that you can disable the Control+v key binding on the browser side so we can handle the event ourselves?
Is this a feature that can be added?
eo_support
Posted: Tuesday, February 23, 2016 3:53:01 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

No. Also as I have already explained to you, paste does not necessarily to be triggered by Control + V. While it is technical possible to change the browser engine's code to provide a callback for you to handle the paste, this is not a priority now because the amount of code changes needed and we do not have any request from any other customer for this feature. So for the moment we do not have any plan to implement this feature.

Thanks!
Terri
Posted: Wednesday, February 24, 2016 9:06:39 AM
Rank: Newbie
Groups: Member

Joined: 10/8/2015
Posts: 3
Thank you for being up front, we will be moving to another vendor so we can have this support.
eo_support
Posted: Wednesday, February 24, 2016 10:46:20 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
No problem. Please feel free to let us know in case you decide to take a second look and have any questions. We wish you best luck with your project!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.