Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8722

Show
Ignore:
Timestamp:
01/25/08 18:54:22 (2 years ago)
Author:
andrew
Message:

Roll back the fix for #9609, since it does not work in Opera. Instead, avoid using "valueOf" or "toString" as field names in forms.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinoffs/prototype/trunk/CHANGELOG

    r8721 r8722  
    11*SVN* 
     2 
     3* Roll back the fix for #9609, since it does not work in Opera. Instead, avoid using "valueOf" or "toString" as field names in forms. 
    24 
    35* Prevent DOM node expandos _countedByPrototype and _prototypeEventID from being serialized into (inner|outer)HTML in IE. Closes #10909. [dcpedit, Tobie Langel, Andrew Dupont] 
  • spinoffs/prototype/trunk/src/form.js

    r8713 r8722  
    1515        if (value != null && (element.type != 'submit' || (!submitted && 
    1616            submit !== false && (!submit || key == submit) && (submitted = true)))) {  
    17           if (key in result && !Object.isFunction(result[key])) { 
     17          if (key in result) { 
    1818            // a key is already present; construct an array of values 
    1919            if (!Object.isArray(result[key])) result[key] = [result[key]]; 
  • spinoffs/prototype/trunk/test/unit/form.html

    r8713 r8722  
    126126    </form> 
    127127     
    128     <form id="trouble_form"> 
    129         <input type="text" name="length" value="foo" /> 
    130         <input type="text" name="toString" value="55" /> 
    131         <input type="text" name="valueOf" value="bar" /> 
    132     </form> 
    133128  </div> 
    134129 
     
    408403                      $('form').serialize({ submit: 'inexistent' })); 
    409404                       
    410       // try to serialize form containing toString, valueOf and length -named elements 
    411       assertHashEqual({ length: 'foo', toString: 55, valueOf: 'bar' }, 
    412                       $('trouble_form').serialize(true)); 
    413405    }}, 
    414406