]> source.dussan.org Git - jquery.git/commitdiff
Fix for #1114: Appending legend elements in Firefox
authorBrandon Aaron <brandon.aaron@gmail.com>
Wed, 25 Apr 2007 18:41:49 +0000 (18:41 +0000)
committerBrandon Aaron <brandon.aaron@gmail.com>
Wed, 25 Apr 2007 18:41:49 +0000 (18:41 +0000)
src/jquery/coreTest.js
src/jquery/jquery.js

index 05fd026d7ab3fe89c7ebb4f1c2f8b0f43131377f..9791767089cf42fd76022981933c016b442f5d04 100644 (file)
@@ -356,7 +356,7 @@ test("wrap(String|Element)", function() {
 });
 
 test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() {
-       expect(13);
+       expect(14);
        var defaultText = 'Try them out:'
        var result = $('#first').append('<b>buga</b>');
        ok( result.text() == defaultText + 'buga', 'Check if text appending works' );
@@ -408,6 +408,10 @@ test("append(String|Element|Array&lt;Element&gt;|jQuery)", function() {
        $('#select1').appendTo('#foo');
        t( 'Append select', '#foo select', ['select1'] );
        
+       reset();
+       $('<fieldset>').appendTo('#form').append('<legend id="legend">test</legend>');
+       t( 'Append legend', '#legend', ['legend'] );
+       
 });
 
 test("appendTo(String|Element|Array&lt;Element&gt;|jQuery)", function() {
index 88598678995cafdd6de6c3ddce08b5dad2657717..a2a9b9f7956054b07a1812b32aa872c59ac35b82 100644 (file)
@@ -1486,6 +1486,9 @@ jQuery.extend({
                                        !s.indexOf("<opt") &&
                                        [1, "<select>", "</select>"] ||
                                        
+                                       !s.indexOf("<leg") &&
+                                       [1, "<fieldset>", "</fieldset>"] ||
+                                       
                                        (!s.indexOf("<thead") || !s.indexOf("<tbody") || !s.indexOf("<tfoot")) &&
                                        [1, "<table>", "</table>"] ||