Roll back the fix for #9609, since it does not work in Opera. Instead, avoid using "valueOf" or "toString" as field names in forms.
This commit is contained in:
parent
a1ec25cddb
commit
ffa0d0943c
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Roll back the fix for #9609, since it does not work in Opera. Instead, avoid using "valueOf" or "toString" as field names in forms.
|
||||
|
||||
* Prevent DOM node expandos _countedByPrototype and _prototypeEventID from being serialized into (inner|outer)HTML in IE. Closes #10909. [dcpedit, Tobie Langel, Andrew Dupont]
|
||||
|
||||
* Make Ajax.Request#isSameOrigin JavaScript Lint compliant. [Andrew Dupont]
|
||||
|
|
|
@ -14,7 +14,7 @@ var Form = {
|
|||
key = element.name; value = $(element).getValue();
|
||||
if (value != null && (element.type != 'submit' || (!submitted &&
|
||||
submit !== false && (!submit || key == submit) && (submitted = true)))) {
|
||||
if (key in result && !Object.isFunction(result[key])) {
|
||||
if (key in result) {
|
||||
// a key is already present; construct an array of values
|
||||
if (!Object.isArray(result[key])) result[key] = [result[key]];
|
||||
result[key].push(value);
|
||||
|
|
|
@ -125,11 +125,6 @@
|
|||
<input type="submit" id="ffe_ti2_submit" tabindex="1" />
|
||||
</form>
|
||||
|
||||
<form id="trouble_form">
|
||||
<input type="text" name="length" value="foo" />
|
||||
<input type="text" name="toString" value="55" />
|
||||
<input type="text" name="valueOf" value="bar" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Tests follow -->
|
||||
|
@ -407,9 +402,6 @@
|
|||
assertHashEqual({ val1:4, action:'blah' },
|
||||
$('form').serialize({ submit: 'inexistent' }));
|
||||
|
||||
// try to serialize form containing toString, valueOf and length -named elements
|
||||
assertHashEqual({ length: 'foo', toString: 55, valueOf: 'bar' },
|
||||
$('trouble_form').serialize(true));
|
||||
}},
|
||||
|
||||
testFormMethodsOnExtendedElements: function() {with(this) {
|
||||
|
|
Loading…
Reference in New Issue