[fusion-dev] createElement fails to work on IE9 beta

Mike Adair madair at dmsolutions.ca
Wed Sep 29 10:01:16 EDT 2010


  The supplied patch has been applied to the 2.2 branch of fusion.  As 
Paul mentioned the fix for this is already available in MooTools 1.2.5 
which will be included in the Fusion 2.3 release.

I am still on Windows XP so I'm unable to test this in IE9, can you 
please test it in IE9 and if the issue is resolved please close the 
ticket (http://trac.osgeo.org/fusion/ticket/408).

Also as an FYI I merged all the 2.2 fixes that were made in trunk into 
the 2.2 branch so the 2.2 branch is up-to-date with all the recent fixes.

Mike

On 9/28/2010 5:25 PM, Paul Spencer wrote:
> I talked with Mike about this and he did a bit of research.  There is a fix for this in newer builds of MooTools.  Unfortunately updating jxlib 2.x to support a newer MooTools probably won't happen so instead Mike is going to patch jxlib.uncompressed.js directly for the current release and we will be including the newer MooTools in the jxlib 3 update to Fusion (currently in a sandbox, to be merged to trunk after 2.2 release I believe)
>
> Cheers
>
> Paul
>
> On 2010-09-27, at 8:30 AM, Paul Spencer wrote:
>
>> This code is from within the MooTools library that we bundle with JxLib.  I'm going to check and see what they are doing about IE 9 beta, it is quite probably fixed already there and perhaps there are other bug fixes that could be relevant to IE 9.  If it isn't possible to pull in the IE9 fixes from MooTools then we'll go ahead and make the change directly in jxlib.uncompressed.js in Fusion.
>>
>> Cheers
>>
>> Paul
>>
>> On 2010-09-27, at 12:20 AM, Zac Spitzer wrote:
>>
>>> here the relevant MSDN page
>>>
>>> http://msdn.microsoft.com/en-us/library/ff986077%28v=VS.85%29.aspx
>>>
>>>
>>>
>>> On Mon, Sep 27, 2010 at 1:37 PM, Ted Yang<ted.yang at autodesk.com>  wrote:
>>> Hi all,
>>>
>>>
>>> I’m working on IE9 support from Autodesk, and I found one defect in JxLib, this is because IE9 beta works different with IE8.
>>>
>>> var a = document.createElement("<div>");
>>>
>>> this code works on IE8, but not works on IE9 beta;(Note that if the web page is quite simple, the IE9 will run the page on “Quirks mode” and this code will work, but in most standard webpage this code doesn’t work)
>>>
>>> var a = document.createElement("div");
>>>
>>> this code works on IE9 beta, but not works on IE8;
>>>
>>>
>>> so we suggest to fix it in JxLib’s code, and I wish someone can review it and submit it before Oct. 1th.
>>>
>>> Original code:
>>>
>>>         Document.implement({
>>>
>>>             newElement: function(tag, props) {
>>>
>>>                 if (Browser.Engine.trident&&  props) {
>>>
>>>                     ['name', 'type', 'checked'].each(function(attribute) {
>>>
>>>                         if (!props[attribute]) return;
>>>
>>>                         tag += ' ' + attribute + '="' + props[attribute] + '"';
>>>
>>>                         if (attribute != 'checked') delete props[attribute];
>>>
>>>                     });
>>>
>>>                     tag = '<' + tag +'>';
>>>
>>>                 }
>>>
>>>                 return $.element(this.createElement(tag)).set(props);
>>>
>>>             },
>>>
>>>
>>>             newTextNode: function(text) {
>>>
>>>                 return this.createTextNode(text);
>>>
>>>             },
>>>
>>>
>>>             getDocument: function() {
>>>
>>>                 return this;
>>>
>>>             },
>>>
>>>
>>>             getWindow: function() {
>>>
>>>                 return this.window;
>>>
>>>             }
>>>
>>>
>>>         });
>>>
>>>
>>>
>>> Fixed code(our solution, tested on IE9 beta):
>>>
>>>         document.newElement = function(tag, props) {
>>>
>>>             var createdElement;
>>>
>>>             if (Browser.Engine.trident&&  props) {
>>>
>>>                 ['name', 'type', 'checked'].each(function(attribute) {
>>>
>>>                     if (!props[attribute]) return;
>>>
>>>                     tag += ' ' + attribute + '="' + props[attribute] + '"';
>>>
>>>                     if (attribute != 'checked') delete props[attribute];
>>>
>>>                 });
>>>
>>>                 var replaceTag = '<' + tag +'>';
>>>
>>>                 try {
>>>
>>>                     createdElement = this.createElement(replaceTag);
>>>
>>>                 }
>>>
>>>                 catch (e) {
>>>
>>>                     createdElement = this.createElement(tag);
>>>
>>>                 }
>>>
>>>             }
>>>
>>>             else {
>>>
>>>                 createdElement = this.createElement(tag);
>>>
>>>             }
>>>
>>>             return $.element(createdElement).set(props);
>>>
>>>         };
>>>
>>>
>>>
>>> Best Wishes,
>>>
>>> Ted Yang (Yuanyuan Yang)
>>>
>>> Reeses,Tel: (8621)3866-4595
>>>
>>> <image001.png>
>>>
>>>
>>>
>>> _______________________________________________
>>> fusion-dev mailing list
>>> fusion-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/fusion-dev
>>>
>>>
>>>
>>>
>>> -- 
>>> Zac Spitzer
>>> Solution Architect / Director
>>> Ennoble Consultancy Australia
>>> http://www.ennoble.com.au
>>> http://zacster.blogspot.com
>>> +61 405 847 168
>>>
>>>
>>>
>>> _______________________________________________
>>> fusion-dev mailing list
>>> fusion-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/fusion-dev
>>
>> __________________________________________
>>
>>    Paul Spencer
>>    Chief Technology Officer
>>    DM Solutions Group Inc
>>    http://research.dmsolutions.ca/
>>
>> _______________________________________________
>> fusion-dev mailing list
>> fusion-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/fusion-dev
>
> __________________________________________
>
>     Paul Spencer
>     Chief Technology Officer
>     DM Solutions Group Inc
>     http://research.dmsolutions.ca/
>
> _______________________________________________
> fusion-dev mailing list
> fusion-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-dev
>

-- 
    Michael Adair
    Senior Software Architect
    DM Solutions Group Inc.

    Office: (613) 565-5056 x26
    madair at dmsolutions.ca
    http://www.dmsolutions.ca
    http://research.dmsolutions.ca




More information about the fusion-dev mailing list