#1485 new
Richard Wiseman

Compatibility View setStyle(...) error

Reported by Richard Wiseman | November 30th, 2012 @ 05:01 PM

Not sure how to change the title of this ticket, but my investigations have led me elsewhere!

As far as I can now see, the problem is actually in the 'inject' method. I'm using Scriptaculous and its highlight effect (i.e. Effect.Highlight) uses 'inject' to set the highlight colour.

update: function(position) {
    this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
      return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this)) });

The trouble is, within the function passed to inject(...), the value of 'i' is always undefined in Prototype v1.7.1 but not in v1.7.

Contrary to my original description, this now appears to be nothing to do with Internet Explorer or its Compatibility View. The value of 'i' is also undefined in Firefox, although that doesn't seem to complain as much as IE.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket