Code Monkey home page Code Monkey logo

Comments (11)

cwensley avatar cwensley commented on July 2, 2024

Hm, I'm not too sure how well this will translate into other platforms (gtk/webkit-sharp for example is very minimal), but I will look into it.

from eto.

cwensley avatar cwensley commented on July 2, 2024

I checked other platforms and it seems Windows Forms is the only that actually has shortcut keys as an option. The preferred method to implement shortcuts is to create actions, and make them execute the back/forward/etc buttons.

from eto.

evgeny-k avatar evgeny-k commented on July 2, 2024

pls fix the same for WPF.

testcase:
launch Eto.Test.Wpf.csproj, select WebView tests and press F5 inside WebView.
also IE popup menu isn't disabled

from eto.

cwensley avatar cwensley commented on July 2, 2024

Looks like WPF's WebBrowser can't control any of this functionality.. We'll most likely have to use the WinForms WebBrowser control instead.

Re-opening this issue until it's resolved.

from eto.

evgeny-k avatar evgeny-k commented on July 2, 2024

I can't. I have
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in System.Windows.Forms.dll
Additional information: Error HRESULT E_FAIL has been returned from a call to a COM component.
at
this.Control = new SWF.WebBrowser {
IsWebBrowserContextMenuEnabled = false,
WebBrowserShortcutsEnabled = false,
AllowWebBrowserDrop = false
};

call-stack

System.Windows.Forms.dll!System.Windows.Forms.WebBrowser.Refresh() + 0x3e bytes 
System.Windows.Forms.dll!System.Windows.Forms.WebBrowser.AllowWebBrowserDrop.set(bool value) + 0x48 bytes   
Eto.Platform.Windows.dll!Eto.Platform.Windows.Forms.Controls.WebViewHandler.WebViewHandler() Line 41 + 0x47 bytes   C#
[Native to Managed Transition]  
Eto.dll!Eto.Generator.CreateHandler(System.Type type, Eto.Widget widget) Line 340 + 0x22 bytes  C#
Eto.dll!Eto.Widget.Widget(Eto.Generator generator, System.Type type, bool initialize) Line 127 + 0x16 bytes C#
Eto.dll!Eto.InstanceWidget.InstanceWidget(Eto.Generator generator, System.Type handlerType, bool initialize) Line 183 + 0x13 bytes  C#
Eto.dll!Eto.Forms.Control.Control(Eto.Generator generator, System.Type type, bool initialize) Line 322 + 0x13 bytes C#
Eto.dll!Eto.Forms.WebView.WebView(Eto.Generator generator, System.Type type, bool initialize) Line 163 + 0x13 bytes C#
Eto.dll!Eto.Forms.WebView.WebView(Eto.Generator generator) Line 158 + 0x36 bytes    C#
Eto.dll!Eto.Forms.WebView.WebView() Line 153 + 0x19 bytes   C#

from eto.

cwensley avatar cwensley commented on July 2, 2024

Are you trying to use the WinForms WebBrowser in a WPF application, or just using the Eto.Platform.Windows platform? What OS are you getting this bug on?

from eto.

evgeny-k avatar evgeny-k commented on July 2, 2024

Win7 x64 box
I'm using
var generator = Generator.GetGenerator ("Eto.Platform.Windows.Generator, Eto.Platform.Windows");

this error it raised under debugger only so I can just ignore it

from eto.

cwensley avatar cwensley commented on July 2, 2024

Does this happen with the Eto.Test application? The WebView seems to work fine for me in WinForms generator when debugging under VS 2012 express.

from eto.

evgeny-k avatar evgeny-k commented on July 2, 2024

you are right - it isn't reproduced with Eto.Test
I need try to investigate this more deeply.

from eto.

cwensley avatar cwensley commented on July 2, 2024

Ok, tested on all platforms, keyboard shortcuts are not enabled anywhere, and you can control the context menu via the WebView.BrowserContextMenuEnabled property. A good feature to add later (when needed) would probably be the ability to specify which standard items and custom items to go in the context menu, which should be doable.

from eto.

evgeny-k avatar evgeny-k commented on July 2, 2024

thx. it works now,
however global keyboard shortcuts don't work too

from eto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.