Incompatible with jQuery 1.8 #261

chrisfrancis27 opened this Issue Aug 17, 2012 · 10 comments


None yet
4 participants

Hovering over selectmenu items throws a SyntaxError when used with jQuery 1.8:

SCRIPT5022: Syntax error, unrecognized expression: li:not(.ui-selectmenu-group).slice(3,4)
jquery-1.8.0.js, line 4512 character 2

I believe this is due to an internal change with the way the :not pseudo-selector is handled in the new Sizzle engine as I have experienced this in other code as well. Using the .not() method on a jQuery object should still work as expected though.

For me that does not change anything. The problem is that _selectedOptionLi() function is returning ".splice(-1)" when this._selectedIndex() == -1. It is related to this problem:

Has to be something like this:

_selectedOptionLi: function () {
return this._optionLis.find(":eq(" + this._selectedIndex() + ")");

But then this._selectedIndex() == -1 has to be handled anyway.

moikano commented Aug 29, 2012

I think the problem is in items (A)'s bind('mouseout.selectmenu blur.selectmenu', function() {...}) when use if ($(this).is(self._selectedOptionLi().selector)) {, as pointed in the stackoverflow's post (about .selector property) linked by @Peinkillar.

In 836e026 I fixed it with if ($(this).attr('aria-selected') == 'true') { and now it works properly with jQuery 1.8.

Probably there is a better way, but now for me is ok.

Yes, that works!


fnagel commented Aug 30, 2012

Sorry for the late response, I configured something wrong when GitHub changed there notification system and therefore did not receive any emails :-(

I will take a look in this as soon as possible. Information about jQuery 1.8:


fnagel commented Aug 30, 2012

This is the correct reference to the above revision (above one points to my repo, wired enough, its with the correct code displayed): moikano/jquery-ui@836e026


fnagel commented Oct 1, 2012

Please see #269 for more infos about this issue.

Ive pushed a fix and my tests seem promising. Please test and give feedback!


fnagel commented Oct 3, 2012

I've updated to jQuery 1.8.2 / UI 1.8.20 and it seems to work pretty nice. Please give feedback!


fnagel commented Oct 12, 2012

Please give feedback!

moikano commented Oct 13, 2012

Sorry for the extreme delay... yes, I confirm that your tests (and my project with jQ 1.8.2 / UI 1.8.24) works perfectly with your last 73def95 : the problem was the .selector property.

Thanks a lot!


fnagel commented Oct 13, 2012

Thanks for the feedback. Next: jQuery UI 1.9.0 :-)

Closed, please reopen if needed.

fnagel closed this Oct 13, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment