Skip to content

Commit

Permalink
e4cc703c2453265dc2151f17f5d6824735ce2e20 Fix: A JS error would occur …
Browse files Browse the repository at this point in the history
…if initialised by passing a node which has an id in which characters would normally need to be escaped to make a CSS selector for the id.

https://datatables.net/forums/discussion/78620

Sync to source repo @e4cc703c2453265dc2151f17f5d6824735ce2e20
  • Loading branch information
dtbuild committed Apr 11, 2024
1 parent 761d040 commit 798b1a0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "2.0.3",
"last-sync": "000e6d70c9966b8794caf52a8c287936880071f1"
"last-sync": "e4cc703c2453265dc2151f17f5d6824735ce2e20"
}
4 changes: 3 additions & 1 deletion js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -12538,7 +12538,7 @@
});

// For the first info display in the table, we add a callback and aria information.
if (! $('#' + tid+'_info', settings.nWrapper).length) {
if (! settings._infoEl) {
n.attr({
'aria-live': 'polite',
id: tid+'_info',
Expand All @@ -12547,6 +12547,8 @@

// Table is described by our info div
$(settings.nTable).attr( 'aria-describedby', tid+'_info' );

settings._infoEl = n;
}

return n;
Expand Down
2 changes: 1 addition & 1 deletion js/dataTables.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dataTables.min.mjs

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12485,7 +12485,7 @@ DataTable.feature.register( 'info', function ( settings, opts ) {
});

// For the first info display in the table, we add a callback and aria information.
if (! $('#' + tid+'_info', settings.nWrapper).length) {
if (! settings._infoEl) {
n.attr({
'aria-live': 'polite',
id: tid+'_info',
Expand All @@ -12494,6 +12494,8 @@ DataTable.feature.register( 'info', function ( settings, opts ) {

// Table is described by our info div
$(settings.nTable).attr( 'aria-describedby', tid+'_info' );

settings._infoEl = n;
}

return n;
Expand Down

0 comments on commit 798b1a0

Please sign in to comment.