mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix for #1114: Appending legend elements in Firefox
This commit is contained in:
parent
cb828f3dab
commit
958bed09da
6
src/jquery/coreTest.js
vendored
6
src/jquery/coreTest.js
vendored
@ -356,7 +356,7 @@ test("wrap(String|Element)", function() {
|
||||
});
|
||||
|
||||
test("append(String|Element|Array<Element>|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<Element>|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<Element>|jQuery)", function() {
|
||||
|
3
src/jquery/jquery.js
vendored
3
src/jquery/jquery.js
vendored
@ -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>"] ||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user