#15949 closed defect (fixed)
[regression] dojox/form/Rating no longer stores value in hidden field, form submission is broken.
Reported by: | Nick Fenwick | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8.2 |
Component: | DojoX Widgets | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/form/tests/test_Rating.html
I've found that in 1.8.0 the Rating dijit no longer updates its hidden field. Go to that tests page, view any of the Rating dijits and note the hidden input field, click on the Rating to change its value, the hidden field does not update.
This worked in 1.7.3. I don't know how to link to an online version of that, but have verified it on my local machine. In 1.7.3 Rating.js had:
setAttribute: function(/*String*/key, /**/value){ // summary: When calling setAttribute("value", 4), set the value and render the stars accordingly. this.set(key, value);
The this.set() call ended up defaulting to defaultNode = this.focusNode" and "map = defaultNode" and then setting value on map.. which ended up setting the latest value on the focusNode of Rating, the hidden input field.
1.8 doesn't do any of that dance, Rating.js uses this._set() to set the value which doesn't touch focusNode, so the hidden field never gets set.
A very naive patch might be:
[[email protected] dojo-release-1.8.0-src]$ diff dojox/form/Rating.js ~/src/dojo/dojo-release-1.8.0-src/dojox/form/Rating.js 115,116d114 < // reflect the new value in our hidden field, for form submission. < this.focusNode.value = val;
Change History (4)
comment:1 Changed 8 years ago by
Milestone: | tbd → 1.8.2 |
---|---|
Owner: | changed from dante to bill |
Status: | new → assigned |
Summary: | dojox/form/Rating no longer stores value in hidden field, form submission is broken. → [regression] dojox/form/Rating no longer stores value in hidden field, form submission is broken. |
Looks like I broke it in [29299], I'll fix.