#1209 new
Daniel Magliola

Problem with CSS attribute selectors in 1.7, didn't happen in 1.6.1

Reported by Daniel Magliola | February 8th, 2011 @ 01:53 AM

I recently upgraded from 1.6.1, and one of my selectors broke.

I have an HTML form that has many controls, similar to this

<input type="text" name="blah" required="1" />
<input type="text" name="blah" />
<select name="blah" required="1" />
<select name="blah" />

When running this selector:

$$("*[required=1]").each(function (el) { });

In 1.6.1 I used to get all the controls that have attribute required="1".
When I migrated to 1.7, this now only returns <select> controls, but not inputs, which leads me to believe this is a bug (as opposed to now getting anything back, which might be my rule being badly written)

If I surround the attribute value in single quotes, like this:

$$("*[required='1']").each(function (el) { });

it works, however.

No comments found

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

Pages