Announcement

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

    DOCTYPE and browser compatibility mode

    In the Smartclient Quick Start Guide the following advice is given:

    Code:
    Develop and deploy in browser compatibility mode, not “standards” mode.
    SmartClient components automatically detect and adapt to the browser mode (as determined by DOCTYPE), providing consistent layout and rendering behaviors in both standards/strict and compatibility/quirks modes. However, the interpretation of ―standards mode‖ varies across browsers, and changes across different versions of the same browser. If you develop in “standards mode”, the behavior of your application may change as users perform regular updates to their OS or browser. ―Standards mode‖ in most web browsers is not, as the name implies, a consistent standards-compliant mode.
    If I read this correctly the browser must be forced in the <!DOCTYPE> tag to run in compatibility mode when I develop with Smartclient. As far as I can see there is only one declaration in HTML 5:

    Code:
    <!DOCTYPE html>
    ...which is the "standards mode". How do I then set the browser to compatibility mode from the web page? (I do know how to set, for instance Internet Explorer's, mode via its menus but not through DOCTYPE tag)

    Thanks!

    #2
    Quirks mode is just the absence of <DOCTYPE> at all.

    However, this recommendation has been changed, since Microsoft decided that IE9 would be largely non-functional without the HTML5 DOCTYPE tag. So we now recommend using the HTML DOCTYPE, and hoping for luck as far as future versions (there is no other choice).

    Comment


      #3
      [QUOTE=Isomorphic;94153]Quirks mode is just the absence of <DOCTYPE> at all.

      -------------------------------
      Am I correct with the following?
      -------------------------------
      FOR IE: <!DOCTYPE html> is recommended for development and production

      FOR Safari, FireFox, Opera, Chrome: OMITTING <!DOCTYPE> is recommended for development to force quirks mode and <!DOCTYPE html> is used in production pages?

      Thanks!
      Last edited by henkiemaritz; 23 Oct 2012, 22:05.

      Comment


        #4
        Hi Isomorphic. Could you please clarify a bit regarding browser mode? I notice that you run your showcase in quirks mode, and you write that IE9 is partly non-functional in this mode.
        So I wonder
        a) why is it you are not taking you own medicine, so to speak?
        b) what is it that does not work in IE9 quirks mode? It seems to be working ok in the showcase.

        I have tried running IE9 standards mode, and I am getting a few glitches in the ui. Some layout problems, but most notably some ugly artifacts in listgrids when they are scrolled.

        Is it perhaps best to keep to the quirks mode for now, after all?
        Regards,
        Hans Petter Simonsen, Evry Norway

        Comment


          #5
          a) we're changing this, the Showcase reflects the last release.

          b) <canvas> tag, native JSON parsing, several other HTML5 features. The intersection of these capabilities plus newly introduces bugs in eval() and VML force the use of the HTML5 DOCTYPE.

          If you think you have framework bugs that appear in strict mode, you should post runnable test cases for those.

          Comment


            #6
            We are now also caught by a doctype dilemma:

            We have a product running at our customer's site, based on the latest v82 stream. Up to now, we were using a doctype declaration <!doctype html>.

            With FF17, we have now some layout glitches. See attached screenshot: SC feature explorer 8.2p_2012-12-17 with <!doctype html> on the host page. Calendar events are misplaced (hint: the scrollHeight of the listGrid body is greater than the one calculated by other browsers or previous FF releases).

            Omitting the doctype declaration fixes the FF17 issues, but makes our application unusable for IE8-9.

            How to proceed here?
            Attached Files

            Comment


              #7
              We've just fixed an issue where FF17 changed the way that cell.height was applied when in strict / HTML5 mode. If your screenshot was meant to show Calendar events not perfectly fitting cells, this fix will correct that issue, and likely others as well.

              Comment


                #8
                We tried both v8.2p_2012-12-20 and v8.3p_2012-12-20. When you insert <!doctype html> into the feature explorer host file and look at the Workday Calendar sample, the events are still misplaced under FF 17, exactly as in the screenshot above.
                Has the fix not yet been rolled out? Btw, we would need a fix for v8.2p.

                Comment


                  #9
                  We apologize for the confusion here. The fix made it into the 8.3 branch and the 9.0d branch but never got backported to 8.2

                  It has been now. Please try the next nightly build on that branch, dated Dec 28 or greater

                  Regards
                  Isomorphic Software

                  Comment

                  Working...
                  X