Skip to content

Commit 301d948

Browse files
committed
Fix #116: Prevent some browsers to persist the state of checkboxes.
From MDN page (https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete): Note: The `autocomplete` attribute also controls whether Firefox will — unlike other browsers — persist the dynamic disabled state and (if applicable) dynamic checkedness of an <input> element, <textarea> element, or entire <form> across page loads. The persistence feature is enabled by default. Setting the value of the `autocomplete` attribute to `off` disables this feature. This works even when the `autocomplete` attribute would normally not apply by virtue of its type. See bug 654072 (https://bugzilla.mozilla.org/show_bug.cgi?id=654072).
1 parent 83156b4 commit 301d948

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

js/dataTables.checkboxes.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/*! Checkboxes 1.2.11
1+
/*! Checkboxes 1.2.12-dev
22
* Copyright (c) Gyrocode (www.gyrocode.com)
33
* License: MIT License
44
*/
55

66
/**
77
* @summary Checkboxes
88
* @description Checkboxes extension for jQuery DataTables
9-
* @version 1.2.11
9+
* @version 1.2.12-dev
1010
* @file dataTables.checkboxes.js
1111
* @author Gyrocode (http://www.gyrocode.com/projects/jquery-datatables-checkboxes/)
1212
* @contact http://www.gyrocode.com/contacts
@@ -150,7 +150,7 @@
150150

151151
if(ctx.aoColumns[i].mRender === null){
152152
colOptions['render'] = function(){
153-
return '<input type="checkbox" class="dt-checkboxes">';
153+
return '<input type="checkbox" class="dt-checkboxes" autocomplete="off">';
154154
};
155155
}
156156

@@ -994,7 +994,7 @@
994994
* @type {mixed}
995995
* @default `<input type="checkbox">`
996996
*/
997-
selectAllRender: '<input type="checkbox">'
997+
selectAllRender: '<input type="checkbox" autocomplete="off">'
998998
};
999999

10001000

0 commit comments

Comments
 (0)