aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrandon Aaron <brandon.aaron@gmail.com>2007-04-25 18:41:49 +0000
committerBrandon Aaron <brandon.aaron@gmail.com>2007-04-25 18:41:49 +0000
commit958bed09da67c052dfa85c0bb8c0dc88873e5923 (patch)
tree740c5aae379e3286180bbbd12d880d49a52fab11 /src
parentcb828f3dab6ec8439ac111246346a8d4b3205fed (diff)
downloadjquery-958bed09da67c052dfa85c0bb8c0dc88873e5923.tar.gz
jquery-958bed09da67c052dfa85c0bb8c0dc88873e5923.zip
Fix for #1114: Appending legend elements in Firefox
Diffstat (limited to 'src')
-rw-r--r--src/jquery/coreTest.js6
-rw-r--r--src/jquery/jquery.js3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js
index 05fd026d7..979176708 100644
--- a/src/jquery/coreTest.js
+++ b/src/jquery/coreTest.js
@@ -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() {
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js
index 885986789..a2a9b9f79 100644
--- a/src/jquery/jquery.js
+++ b/src/jquery/jquery.js
@@ -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>"] ||