#1276 new
John McClure

Element.setStyle bug

Reported by John McClure | September 15th, 2011 @ 10:02 PM

Not sure why, but I get a NULL returned by styles.match, so the array reference threw an excp...

/* Prototype JavaScript framework, version line 1922 was ...

element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;

line 1922 could be....

element.setOpacity( (m = styles.match(/opacity:\s*(\d?\.?\d*)/)) ? m[1] : element ) : element;

This code within Element.setStyle looks a bit like a classic hack.

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