locked
WebBrowser control vs IE10 : different behaviors RRS feed

  • Question

  • I want to have a complex web page hosted on a WebBrowser control in my app (with some jQuery, dynamic css style modifications, etc...) but it turns out what works perfectly in IE10 does not work at all in the WebBrowser control.

    • "-ms-touch-action: none" doesn't seem to work (does on IE10)
    • "-ms-user-select: none" does not work (does in IE10)
    • $(window).width() and $(window).height return 0 (return the viewport sizes in IE10)
    • opacity: x.x, filter: alpha(opacity=xx) or any other method to change opacity do not work (they do in IE10)

    IsScriptEnabled is true, javascript does work, jQuery does work, but everything I stated above does not. Am I doing something wrong or is there really a difference of implementation between IE10 and WebBrowser ? 

    Thursday, May 16, 2013 11:42 AM

Answers

  • Turns out all I had to do was adding a doctype to my page, and everything works fine now. So if you see strange things, stuff not working while they should, check that you have <!DOCTYPE html> at the start of your file.
    Thursday, May 16, 2013 11:56 AM