Added a fix for bug #1489, appending <caption> was broken.
This commit is contained in:
parent
d38ee78db9
commit
760a244dbd
2 changed files with 6 additions and 2 deletions
6
src/jquery/coreTest.js
vendored
6
src/jquery/coreTest.js
vendored
|
@ -355,7 +355,7 @@ test("wrap(String|Element)", function() {
|
|||
});
|
||||
|
||||
test("append(String|Element|Array<Element>|jQuery)", function() {
|
||||
expect(17);
|
||||
expect(18);
|
||||
var defaultText = 'Try them out:'
|
||||
var result = $('#first').append('<b>buga</b>');
|
||||
ok( result.text() == defaultText + 'buga', 'Check if text appending works' );
|
||||
|
@ -417,6 +417,10 @@ test("append(String|Element|Array<Element>|jQuery)", function() {
|
|||
$('#table colgroup').append('<col/>');
|
||||
ok( $('#table colgroup col').length, "Append col" );
|
||||
|
||||
reset();
|
||||
$('#table').append('<caption></caption>');
|
||||
ok( $('#table caption').length, "Append caption" );
|
||||
|
||||
reset();
|
||||
$('form:last')
|
||||
.append('<select id="appendSelect1"></select>')
|
||||
|
|
2
src/jquery/jquery.js
vendored
2
src/jquery/jquery.js
vendored
|
@ -1566,7 +1566,7 @@ jQuery.extend({
|
|||
!s.indexOf("<leg") &&
|
||||
[1, "<fieldset>", "</fieldset>"] ||
|
||||
|
||||
(!s.indexOf("<thead") || !s.indexOf("<tbody") || !s.indexOf("<tfoot") || !s.indexOf("<colg")) &&
|
||||
s.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
|
||||
[1, "<table>", "</table>"] ||
|
||||
|
||||
!s.indexOf("<tr") &&
|
||||
|
|
Loading…
Reference in a new issue