#408 ✓duplicate
William Warby

Selector Expression Causing Endless Loop - Hangs Browser

Reported by William Warby | October 26th, 2008 @ 10:15 AM | in 1.6.1

I haven't investigated exactly why, but the following expression hangs Firefox (and presumably other browsers):

$$('.picture-news-tabs li:not(.selected) a|h2')

Prototype gets suck in the gsub method in an endless loop whilst evaluating this expression until you eventually get the unresponsive script warning. There's almost certainly something wrong with my CSS expression here (it's the first time I've used CSS3 selectors) but no amount of badly written selectors should cause a browser crash right?

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

Referenced by