FLUID-3953 options

Antranig Basman antranig.basman at colorado.edu
Mon May 30 06:58:41 UTC 2011

Hi Harris - thanks for looking into this bug. I suggest the following two options:

4. Find where such bugs in IE9 are reported and make sure that the erroneous behaviour of 
element.getAttribute() is reported there (even though the historical rate of resolving such bugs is 
extremely low)
5. Switch to the use of $(el).prop("id") rather than the $(el).attr("id") that we currently use.

It appears that jQuery's clear distinction since 1.6 of element attributes and element properties allows 
this bug to be resolved, since IE9's corruption only extends to namespaced attribute values.

Please make sure when you address bug reports, that you take care to find the root cause of the issue, 
rather than just taking actions to make sure that the test case passes again. Although Fluid now deprecates 
the use of rsf:id and expects that users will not follow this strategy, it's not acceptable for the 
framework to fail in such a serious way when such namespaced attributes are found in the markup (even if 
they are not present for our own renderer, there are numerous other rendering frameworks, for example, 
Wicket, which may present just the same kind of namespaced id attribute in the markup).

It's important to distinguish this kind of test case failure, example, from the ones we see for the cases of 
focus and blur on a few browsers. Having investigated these failures, we know that these are benign, since 
they do not cause failures which will be visible to users in real operation of the framework, but are simply 
artefacts of the limitations on fidelity of event simulation in test cases.
However, the failures in this test case are not benign, and correspond to real fatal errors which will be 
seen by users when operating the component on the actual platform. It's crucial to make sure that these 
errors can never occur in any circumstances, which is why I don't think the three resolutions you have 
proposed are sufficient.

I've pushed a branch which resolves our use of attr("id") and getAttribute("id") framework-wide to the 
appropriate use of properties to https://github.com/amb26/infusion/commits/FLUID-3953 along with a pull 
request - justino, could you review - I've tested on FF3, IE9 and Chrome so far,

On 27/05/2011 07:58, Wong, Harris wrote:
> Hi all,
> The unit tests in ImageReorderer fails in IE9 as described here http://issues.fluidproject.org/browse/FLUID-3953.  This is probably due to the Document Mode in IE9, in conjunction with the use of "rsf:id".  When using "rsf:id" with IE9 Document Mode, it replaces the "id" attribute with 'rsf:id", resulting 2 "rsf:id" in the element's list of attributes.  As a result, calling fluid.jById('foo'), jQuery('#foo'), or document.getElementById('foo') returns null.
> If we run the Pager demo which uses "rsf:id", it seems to work fine; if we run the ImageReorderer demo, it seems to work fine as well.  The problem seems to affect the ImageReorderer UnitTest only.  Here are a few suggestions I have to address this problem, I am not sure which is the best however:
> 1. Remove "rsf:id", since image reorderer doesn't need "rsf:id".
> 2. Add meta-data to force IE9 to use other document mode.<meta http-equiv="X-UA-Compatible" content="IE=xxx">, http://msdn.microsoft.com/en-us/library/cc288325%28v=vs.85%29.aspx
> 3. This could be an IE9 bug since it makes no sense to overwrite the "id" attribute with our custom attribute "rsf:id". We may want to mark this test case as "expected to fail with IE9" and wait till it's fixed on IE9, then re-test it again.
> I vote #1.

More information about the fluid-work mailing list