Skip to content

Commit 1f90631

Browse files
authored
Fix: Prevent mobile focus loop
Merge pull request #112 from Seb33300/fix-mobile
2 parents 75903eb + 665e459 commit 1f90631

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

js/dataTables.fixedHeader.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,11 +526,13 @@ $.extend(FixedHeader.prototype, {
526526
itemDom.placeholder = null;
527527
}
528528

529-
if (item === 'header') {
530-
itemDom.host.prepend(tablePart);
531-
}
532-
else {
533-
itemDom.host.append(tablePart);
529+
if (!$.contains(itemDom.host[0], tablePart[0])) {
530+
if (item === 'header') {
531+
itemDom.host.prepend(tablePart);
532+
}
533+
else {
534+
itemDom.host.append(tablePart);
535+
}
534536
}
535537

536538
if (itemDom.floating) {

0 commit comments

Comments
 (0)