Search and Top Navigation
#9601 closed bug (fixed)
Opened October 14, 2013 08:04AM UTC
Closed October 16, 2013 08:22PM UTC
Last modified November 26, 2013 08:55PM UTC
Widget: calling _setOption with undefined as 3rd argument makes it a getter
Reported by: | Gruewo | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.4 |
Component: | ui.widget | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
calling $('#...').widgetname('option', 'optionName', undefined) does not set the option to undefined, instead it returns the current value, which breaks method chaining, is undocumented ( http://api.jqueryui.com/jQuery.widget/#method-_setOption ) and breaks my expectation of being a setter.
See http://bugs.jquery.com/ticket/9427 for a similar issue that has been fixed some time ago.
Attachments (0)
Change History (6)
Changed October 14, 2013 12:30PM UTC by comment:1
status: | new → open |
---|---|
summary: | calling _setOption with undefined as 3rd argument makes it a getter → Widget: calling _setOption with undefined as 3rd argument makes it a getter |
Changed October 15, 2013 03:50AM UTC by comment:2
PR -> https://github.com/jquery/jquery-ui/pull/1106 for review
Changed October 16, 2013 08:22PM UTC by comment:3
resolution: | → fixed |
---|---|
status: | open → closed |
Widget: option-method should work as getter only when argument length is 1. Fixes #9601 - Widget: calling _setOption with undefined as 3rd argument makes it a getter
Changeset: ecde7cd41a59e9c3ff07f56baeeaec2147cca779
Changed October 18, 2013 05:12PM UTC by comment:4
milestone: | none → 1.11.0 |
---|
Changed November 26, 2013 08:54PM UTC by comment:5
Widget: option-method should work as getter only when argument length is 1. Fixes #9601 - Widget: calling _setOption with undefined as 3rd argument makes it a getter
(cherry picked from commit ecde7cd41a59e9c3ff07f56baeeaec2147cca779)
Changeset: 6cdebe84f8fb20374bb9dd32b62cba1b7f8dfd13
Changed November 26, 2013 08:55PM UTC by comment:6
milestone: | 1.11.0 → 1.10.4 |
---|
Agree that we should probably follow the precedent from core. Test case - http://jsfiddle.net/tj_vantoll/FQPzq/.