Changeset 13189

Show
Ignore:
Timestamp:
03/24/08 20:23:35 (5 months ago)
Author:
bill
Message:

Make comparison of Editor return code ignore irrelevant whitespace. Fixes #6091.
Also added reset check, part of patch to #6299 (refs #6299)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/tests/form/Form.html

    r13120 r13189  
    9595                                [ 
    9696                                        function getValues(){ 
    97                                                 doh.is( dojo.toJson(original), dojo.toJson(dijit.byId("myForm").getValues()) ); 
     97                                                var values = dijit.byId("myForm").getValues(); 
     98                                                 
     99                                                // FF3 sticks in some tabs and newlines that mess up the equality check 
     100                                                // Need better way to compare two HTML trees but for now do this. 
     101                                                values.richtext = values.richtext.replace(/[\n\t]/, "", "g"); 
     102 
     103                                                doh.is( dojo.toJson(original), dojo.toJson(values) ); 
    98104                                        }, 
    99105                                        function setValues(){ 
     
    146152                        return true; 
    147153                </script> 
     154                <script type="dojo/method" event="onReset"> 
     155                        return confirm('reset Form?'); 
     156                </script> 
    148157                <p>Just HTML text</p> 
    149158                <table style="border: 1px solid #9f9f9f;" cellspacing="10"> 
     
    321330                                        <td>richtext</td> 
    322331                                        <td> 
    323                                                 <textarea dojoType="dijit.Editor" name="richtext" pluginsConfig="[{items:['bold','italic']}]"> 
    324                                                         <h1>original</h1> 
    325                                                         <p>This is the default content</p> 
    326                                                 </textarea> 
     332                                                <textarea dojoType="dijit.Editor" name="richtext" pluginsConfig="[{items:['bold','italic']}]"><h1>original</h1><p>This is the default content</p></textarea> 
    327333                                        </td> 
    328334                                </tr>