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

selection / deselection has issues with jQuery 1.9 #143

Open
michelgre opened this issue Feb 19, 2013 · 5 comments
Open

selection / deselection has issues with jQuery 1.9 #143

michelgre opened this issue Feb 19, 2013 · 5 comments

Comments

@michelgre
Copy link

jQuery 1.9 obsoleted the way boolean attributes such as 'selected' are handled.
Thus the selection / deselection of ui.multiselect doesn't work properly anymore with some browsers (Firefox 18).

To reproduce:

  • use Firefox 18.0
  • create a page with ui.multiselect and jQuery 1.9
  • select all options: it works
  • deselect all options: it works
  • select all options again: it doesn't work.

Fix:
Change the occurences of:
attr('selected','selected') => prop('selected', true)
removeAttr('selected') => prop('selected, false)

See http://bugs.jquery.com/ticket/13474 for a discussion about this issue (I did not refer to ui.multiselect there, but I opened the ticket there because of this problem here).

Thanks for ui.multiselect though !!!

@yanickrochon
Copy link
Collaborator

Will do! I had started replacing them but didn't see any errors on my side.

Note that you might also take a look at the next version of this widget, which does support jQuery 1.9

@michelgre
Copy link
Author

Well it is not so easy to hit the error, it depends on some obscure behavior of some browsers, but they confirmed that we should not use attr() anymore.

And I was not aware of multiselect-2, so thanks for the link!

@andrefagundes
Copy link

Did the replacement and resolved. thank you

@sjuhos
Copy link

sjuhos commented Oct 22, 2014

Thanx.

@imadboy89
Copy link

thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants