Hi All,

This appears to be a bug in IE, not prototype, as it is not applying
the class attribute using the specified 'className' property (http://
msdn.microsoft.com/en-us/library/ms533560(VS.85).aspx), but using the
attribute name 'class' instead, so as a work around I have added this
around line 1809 in prototype.js:

if (Prototype.Browser.IE && (parseFloat(navigator.appVersion.split
("MSIE")[1]) >= 8.0) && (name == "className")) name='class';

so it now looks like:

...
name = t.names[attr] || attr;
if (Prototype.Browser.IE && (parseFloat(navigator.appVersion.split
("MSIE")[1]) >= 8.0) && (name == "className")) name='class';
value = attributes[attr];
...

This seems to fix the problem and I have tested in IE7, IE8, FF3,
Opera 9.5, Safari 3 and Chrome 2.0 (all on Windows) and it appears to
have no other side effects.

Kinds regards,

Andrew
Completely Free Dating
www.completelyfreedating.co.uk

On Mar 21, 12:22 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
> @masterleep:
>
> I think there are still some IE8 issues.  Now that a final is out,
> they'll probably get resolved soon.  I know kangax (at least) is
> working on some of them and several have already been resolved in the
> trunk version.  Would you give the trunk version a go?
>
> @RobG:
>
> > Then that is a bug in IE 8.
>
> It _may_ be.  Half the point of readAttribute it that it "...cleans up
> the horrible mess Internet Explorer makes when handling attributes"[1]
> and consequently it does a *lot* of processing around the getAttribute
> call, including (in trunk) several IE8-specific branches.  Always
> possible that that code isn't handling something right.  Equally, it's
> entirely possible that there's a (new) bug in IE8. :-)  I don't
> currently have a machine I can load IE8 on to find out whether the
> fault is in IE8's getAttribute or Prototype's readAttribute.
>
> [1]http://prototypejs.org/api/element/readAttribute
>
> --
> T.J. Crowder
> tj / crowder software / com
> Independent Software Engineer, consulting services available
>
> On Mar 21, 11:29 am, RobG <rg...@iinet.net.au> wrote:
>
> > On Mar 20, 6:18 am, masterleep <bill-goo...@lipa.name> wrote:
>
> > > OK, I found this particular one... if you call
> > > input_elem.readAttribute('value');
> > > on an input element, and the value is equal to the empty string, then
> > > in IE8 the result is null.
>
> > Then that is a bug in IE 8.  readAttribute uses getAttribute, which
> > returns a string in browsers that are compliant with the W3C DOM Core
> > spec:
>
> > <URL:http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-666EE0F9>
>
> > >  On other browsers, the result is the empty
> > > string.
>
> > Which is compliant with the spec.
>
> > An alternative is to use the DOM property for HTML attributes (i.e.
> > inputElement.value) - what does that return (I don't have access to IE
> > 8 at the moment)?
>
> > --
> > Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to