mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-18 16:54:14 +01:00
Fix: IE8 bug where an empty string read from a DOM input element is JSON encoded as '"null"' - absolutely mental! See this blog post for more information http://blogs.msdn.com/b/jscript/archive/2009/06/23/serializing-the-value-of-empty-dom-elements-using-native-json-in-ie8.aspx .
This commit is contained in:
parent
773c88b9f6
commit
732d25b229
8
media/js/jquery.dataTables.js
vendored
8
media/js/jquery.dataTables.js
vendored
@ -1968,19 +1968,21 @@
|
||||
jqFilter.bind( 'keyup.DT', function(e) {
|
||||
/* Update all other filter input elements for the new display */
|
||||
var n = oSettings.aanFeatures.f;
|
||||
var val = this.value==="" ? "" : this.value; // mental IE8 fix :-(
|
||||
|
||||
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( n[i] != $(this).parents('div.dataTables_filter')[0] )
|
||||
{
|
||||
$(n[i]._DT_Input).val( this.value );
|
||||
$(n[i]._DT_Input).val( val );
|
||||
}
|
||||
}
|
||||
|
||||
/* Now do the filter */
|
||||
if ( this.value != oPreviousSearch.sSearch )
|
||||
if ( val != oPreviousSearch.sSearch )
|
||||
{
|
||||
_fnFilterComplete( oSettings, {
|
||||
"sSearch": this.value,
|
||||
"sSearch": val,
|
||||
"bRegex": oPreviousSearch.bRegex,
|
||||
"bSmart": oPreviousSearch.bSmart ,
|
||||
"bCaseInsensitive": oPreviousSearch.bCaseInsensitive
|
||||
|
@ -33,19 +33,21 @@ function _fnFeatureHtmlFilter ( oSettings )
|
||||
jqFilter.bind( 'keyup.DT', function(e) {
|
||||
/* Update all other filter input elements for the new display */
|
||||
var n = oSettings.aanFeatures.f;
|
||||
var val = this.value==="" ? "" : this.value; // mental IE8 fix :-(
|
||||
|
||||
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( n[i] != $(this).parents('div.dataTables_filter')[0] )
|
||||
{
|
||||
$(n[i]._DT_Input).val( this.value );
|
||||
$(n[i]._DT_Input).val( val );
|
||||
}
|
||||
}
|
||||
|
||||
/* Now do the filter */
|
||||
if ( this.value != oPreviousSearch.sSearch )
|
||||
if ( val != oPreviousSearch.sSearch )
|
||||
{
|
||||
_fnFilterComplete( oSettings, {
|
||||
"sSearch": this.value,
|
||||
"sSearch": val,
|
||||
"bRegex": oPreviousSearch.bRegex,
|
||||
"bSmart": oPreviousSearch.bSmart ,
|
||||
"bCaseInsensitive": oPreviousSearch.bCaseInsensitive
|
||||
|
Loading…
x
Reference in New Issue
Block a user