Skip to main content

Bug Tracker

Side navigation

#12856 closed bug (fixed)

Opened November 06, 2012 02:14PM UTC

Closed December 04, 2012 04:44AM UTC

Last modified December 04, 2012 07:33PM UTC

Syntax error, unrecognized expression in jquery 1.8+

Reported by: pedro.rainho@gmail.com Owned by: timmywil
Priority: low Milestone: 1.9
Component: selector Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:
Description

This is an error that happen in ipad and when I run this selector

$headers.filter(':not([colspan])[data-column="' + i + '"]:last,[colspan="1"][data-column="' + i + '"]:last')

I have the error

Syntax error, unrecognized expression :not([colspan])[data-column="0"]:last,[colspan="1"][data-column="0"]:last

I've tested with Jquery 1.8.2: http://jsfiddle.net/W8Mm3/2/

I've tested with Jquery 1.8.1: http://jsfiddle.net/W8Mm3/

I've tested with Jquery 1.8.0: http://jsfiddle.net/W8Mm3/3

Both have the same error:

I've tested with Jquery 1.7: http://jsfiddle.net/W8Mm3/1/

I've tested with Jquery 1.7.1: http://jsfiddle.net/W8Mm3/4/

I've tested with Jquery 1.7.2: http://jsfiddle.net/W8Mm3/5/

And I don't have that error

So the error was introduced in jquery 1.8.0

Attachments (0)
Change History (12)

Changed November 06, 2012 03:06PM UTC by timmywil comment:1

component: unfiledselector
resolution: → worksforme
status: newclosed

There's too much going on in the tests. When reduced, I am unable to reproduce:

http://jsfiddle.net/timmywil/W8Mm3/21/

Changed November 06, 2012 03:26PM UTC by dmethvin comment:2

Looks like it's this bug, not sure if it's been fixed or not: https://github.com/Mottie/tablesorter/issues/132

Also it's not clear to me why it would only affect Safari?? I don't have an iPad handy but I can't repro on desktop Safari 5.1.

Changed November 06, 2012 04:48PM UTC by Pedro Rainho <pedro.rainho@gmail.com> comment:3

I've wrote "This is an error that happen in ipad"

It doesn't happen in pc browsers.

Also I don't know why someone close the bug and didn't bother to test it well.

Mr. timmywil using you demo: http://jsfiddle.net/timmywil/W8Mm3/21/

The error HAPPEN in IPAD 1 - version IOS 5

Did you even test it?

Changed November 06, 2012 04:50PM UTC by Pedro Rainho <pedro.rainho@gmail.com> comment:4

Replying to [comment:1 timmywil]:

There's too much going on in the tests. When reduced, I am unable to reproduce: http://jsfiddle.net/timmywil/W8Mm3/21/

Did you even test you demo in ipad? I've test it and the error happen. Please re-open the bug.

Changed November 06, 2012 09:41PM UTC by timmywil comment:5

milestone: None1.8.3
priority: undecidedhigh
resolution: worksforme
status: closedreopened

Sorry, I didn't see the "in ipad". It does seem ridiculous that this would only be a problem in Safari.

Changed November 06, 2012 09:47PM UTC by timmywil comment:6

priority: highlow
status: reopenedopen

_mobile_ Safari even. However, I don't see the issue in iOS 6.0 (http://cl.ly/image/0Z2e3t0i3b3z). My guess is that there was a bug in mobile Safari.

Changed November 07, 2012 09:06AM UTC by Pedro Rainho <pedro.rainho@gmail.com> comment:7

This problem doesn't happen on pc safari and I can't see if it happen in ios 6 since I don't have an ipad2+. I do know that happen in ios 5 (ipad1).

Yesterday me and the author of tablesorter we manage to split the selector in parts

from this:

h = $headers.filter(':not([colspan])[data-column="' + i + '"]:last,[colspan="1"][data-column="' + i + '"]:last')

to this:

h = $headers.filter(':not([colspan])');

h = h

.add( $headers.filter('[colspan="1"]') ) // ie8 fix

.filter('[data-column="' + i + '"]:last');

And for now it's working. I start doing this because I also had other errors with long selectors and the solution was divide the selector in parts.

Changed November 07, 2012 11:55AM UTC by Pedro Rainho <pedro.rainho@gmail.com> comment:8

I've tested with Ipad 2 and this doesn't happen. So it's a bug in ipad 1 IOS 5

Changed November 11, 2012 08:34PM UTC by dmethvin comment:9

milestone: 1.8.31.9

Changed November 19, 2012 05:29PM UTC by timmywil comment:10

owner: → timmywil
status: openassigned

Changed December 04, 2012 04:44AM UTC by Richard Gibson comment:11

resolution: → fixed
status: assignedclosed

Fix #12856: keep PSEUDO regex non-greedy

Changeset: 3ab26340dcdf001da4e93df2f187a8343615673c

Changed December 04, 2012 07:33PM UTC by timmywil comment:12

Can we fix it so that the bot gives us a real link to the changeset?