Results 1 to 3 of 3

Thread: [OPEN-199][3.0+] Ext is not XHTML compliant

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default [OPEN-199][3.0+] Ext is not XHTML compliant

    Ext is not XHTML compliant. Most browsers don't care, but Firefox in XHTML mode behaves according to strict W3C rules and fails.

    1. There are several places in the code that use document.body.

    Example (save as test.xhtml and open with Firefox):
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:ext="http://www.extjs.com">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="../ext/build/ext-3.0+/resources/css/ext-all.css" />
    <script type="text/javascript" src="../ext/build/ext-3.0+/adapter/ext/ext-base-min.js"></script>
    <script type="text/javascript" src="../ext/build/ext-3.0+/ext-all-min.js"></script>
    <style type="text/css">
    </style>
    <script type="text/javascript">
    <![CDATA[Ext.onReady(function() {
    	new Ext.Viewport({
    		layout: 'border',
    		items: [{
    			region: 'west',
    			title: 'West',
    			width: 200,
    			split: true
    		},{
    			region: 'center',
    			title: 'Center'
    		}]
    	});
    });]]>
    </script>
    </head>
    <body>
    </body>
    </html>
    which fails on:
    Code:
    Ext.SplitBar.createProxy = function(dir){
        var proxy = new Ext.Element(document.createElement("div"));
        proxy.unselectable();
        var cls = 'x-splitbar-proxy';
        proxy.addClass(cls + ' ' + (dir == Ext.SplitBar.HORIZONTAL ? cls +'-h' : cls + '-v'));
        document.body.appendChild(proxy.dom);
        return proxy.dom;
    };
    I suggest changing references from document.body to Ext.getBody().dom (if documentElement isn't already used in combination with body).


    2. &nbsp; isn't allowed in XHTML. Most &nbsp; characters were removed in Ext 3.0.0, but HtmlEditor still contains a few. These should also be replaced with &#160;.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,608
    Vote Rating
    874
      0  

    Default

    Agreed, I've opened a ticket.
    Evan Trimboli
    Twitter - @evantrimboli

  3. #3
    Sencha User
    Join Date
    Sep 2009
    Posts
    34
    Vote Rating
    0
      0  

    Default

    Further XHTML issues (to do with assigning invalid XML via innerHTML):

    http://www.extjs.com/forum/showthrea...851#post404851

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •