#10662 closed bug (fixed)
Selectmenu: Calling refresh() after removing all options throws an error
Reported by: | janom | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.12.0 |
Component: | ui.selectmenu | Version: | 1.11.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
after remove all options from select and then call refresh on selectmenu, i get error: "this.menuItems is undefined" http://jsfiddle.net/janom/w0q994gu/
Change History (13)
comment:1 Changed 8 years ago by
Status: | new → open |
---|---|
Summary: | selectmenu refresh empty options throw error → Selectmenu: Calling refresh() after removing all options throws an error |
comment:3 Changed 8 years ago by
If you're interested in submitting a patch please do so as a pull request.
comment:5 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Selectmenu: Better handling when there are no options
Fixes #10662 Closes gh-1370 Closes gh-1423
Changeset: 65584c1640f8c7430587738c3c4cd7dd8010a2a5
comment:6 Changed 8 years ago by
Milestone: | none → 1.12.0 |
---|
comment:8 Changed 7 years ago by
Excuse me, I'm experiencing the same problem on jquery UI 1.11.4 now, downloaded from official link. How come that the code there is old - not the one that is present in the fix? I've tried to replace piece of code, related to selectmenu, from selectmenu.js from github. But then getting exception here: var item = ui.item.data("ui-selectmenu-item"); in focus event, since ui.item is empty object...
comment:9 follow-up: 10 Changed 7 years ago by
The milestone on this ticket is 1.12.0, which means that the fix wouldn't be included in 1.11.4.
comment:10 Changed 7 years ago by
Replying to scottgonzalez:
The milestone on this ticket is 1.12.0, which means that the fix wouldn't be included in 1.11.4.
Ok. Then how should i fix the issue with refreshing after removing options? Thanks.
comment:12 Changed 7 years ago by
Replying to scottgonzalez:
Upgrade to the latest pre-release of 1.12.0.
Thank you. I've replaced 1.11.4 with 1.12 release candidate, but now I got exception when trying to create dialog object (where 1.11.4 worked properly): effectMethod is undefined (effectMethod = $.effects.effect[ args.effect ], args.effect is true, not some effect name). Unfortunately, it's not possible to send call stack from Firebug...
I changed selectmenu javascript... can you please check if my solutions is right? in _refreshMenu: function() i change from this lines:
to this lines:
and in open: function( event ) i change this line:
to this line: