Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Error when a SmartGWT application is loaded in Internet Explorer claiming to be Edge

    In Windows 10, it is possible to run Internet Explorer 11 in emulation mode to make it pretend it is Edge (opening the dev tools with F12, going in the "Emulation" tab, selecting the user agent string "Microsoft Edge"). When opening a SmartGWT application whose onModuleLoad() only contains:

    VLayout v = new VLayout();
    v.draw();

    I get the following warning in the browser console:

    Element:getComputedStyle: Unable to get DOM element specified by 'null'

    immediately followed by an exception:

    Unable to get property 'paddingLeft' of undefined or null reference

    that is thrown from isc_c_Element_deriveStyleProperties in ISC_Core.js.


    This is a problem for us because we are writing a plugin for the AP ENPS software, and it is this embedded IE version with this emulation mode that is used to host HTML content inside this software when it runs on Windows 10.

    When this happens, IE uses the user agent string: "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0".

    In case it helps, here are some of the values returned by isc.Browser.isXXX:

    isEdge: true
    isSafari: true

    isIE: false
    isIE10: false
    isIE11: false
    isChrome: false
    isFirefox: false
    isMoz: false
    isOpera: false

    SmartGWT version obtained with isc.version: "SNAPSHOT_v11.1d_2017-01-05/LGPL Development Only"

    #2
    Hi sepviz,

    did you see this one? Perhaps it helps, perhaps it does not.

    Best regards
    Blama

    Comment


      #3
      Thanks for the pointer. Unfortunately, we already use both <!DOCTYPE html> and <meta http-equiv="X-UA-Compatible" content="IE=EDGE" />.

      Comment


        #4
        So apparently in this mode the browser claims to be Edge, but doesn't actually behave anything like Edge.

        There's a not a lot we can do when a browser supports an emulation mode that just doesn't work, and it's rather bizarre to find some other piece of software that actually wants to use a broken mode like this - must be a serious hackaround.

        All we can offer here is a Feature Sponsorship. We could change how browser detection works so that you can force your own UA string (and other things like document.compatMode) so that you could get our software to treat this browser mode as IE11 again.

        It's not clear if even this would work - in the mode the browser might be behaving like IE11 but with some Edge behaviors? If that's the case it would be a larger project to try to support this broken hybrid mode, if it's even feasible.

        Comment


          #5
          Thanks, I will transmit this information to my company.

          Comment


            #6
            One of my colleagues asked to add that this behaviour is the default setting in Windows 10, not something that the software that wants to host HTML explicitly chooses to use.

            Comment


              #7
              We understood you to say previously that AP ENPS relies upon this broken mode. If you are not actually forced by a third party to use this mode, we would recommend that you do not.

              Comment


                #8
                Colleague of sepviz here, he is travelling and cannot follow up at the moment.

                The setup is as follows: AP ENPS is the hosting application. It does not set any emulation mode, it just relies on the Windows default. Our application is simply a web app being rendered inside an embedded browser control in ENPS, so we cannot override this default client setting on our end.

                See https://www.cyotek.com/blog/configur...rowser-control - the odd thing is that the only way to not be rendered in Edge mode when running in an embedded browser control seems to be to not use a standards mode doctype. I fully agree that this is broken by design, but as a Windows default it will affect every scenario where a SmartGWT web app is rendered inside an embedded browser control in a Windows application. Given that, it would be useful for SmartGWT to offer a generic way to deal with this situation, as it will affect many more applications than ours.

                Comment


                  #9
                  This document you linked to about the Windows browser control doesn't appear to agree with what you're saying. It says instead that the default is to run in IE11 in "edge mode", which means maximum standards. This is fine, and supported (please try it out).

                  The problem is that the embedded browser appears to be claiming to be Edge, which is not the same thing as IE11 in edge mode. Edge is a different codebase from IE11 and needs a whole different set of workarounds.

                  We don't know whether AP ENPS is perhaps forcing this mode somehow, but let us know if you figure it out.

                  Comment


                    #10
                    Thanks for the fast feedback - we'll investigate a bit.

                    Comment

                    Working...
                    X