Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with jQuery 1.8 #261

Closed
chrisfrancis27 opened this issue Aug 17, 2012 · 10 comments

Comments

Projects
None yet
4 participants
@chrisfrancis27
Copy link

commented Aug 17, 2012

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.

@Peinkillar

This comment has been minimized.

Copy link

commented Aug 28, 2012

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: http://stackoverflow.com/questions/12002783/jquery-future-elements-selector

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

This comment has been minimized.

Copy link

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.

@Peinkillar

This comment has been minimized.

Copy link

commented Aug 30, 2012

Yes, that works!
Thanks

@fnagel

This comment has been minimized.

Copy link
Owner

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: http://blog.jquery.com/2012/08/09/jquery-1-8-released/

@fnagel

This comment has been minimized.

Copy link
Owner

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@836e026

@fnagel

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link
Owner

commented Oct 12, 2012

Please give feedback!

@moikano

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Owner

commented Oct 13, 2012

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

Closed, please reopen if needed.

@fnagel fnagel closed this Oct 13, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.