mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-18 16:54:14 +01:00
Fix: If the user is currently focused on the filtering input element, don't overwrite the value that is already shown as this will effect the cursor position.
This commit is contained in:
parent
a19e1dee12
commit
d1142e1450
5
media/js/jquery.dataTables.js
vendored
5
media/js/jquery.dataTables.js
vendored
@ -5622,7 +5622,10 @@
|
||||
var n = oSettings.aanFeatures.f;
|
||||
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
|
||||
{
|
||||
$(n[i]._DT_Input).val( sInput );
|
||||
if ( n[i]._DT_Input != document.activeElement )
|
||||
{
|
||||
$(n[i]._DT_Input).val( sInput );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -683,7 +683,10 @@ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseIns
|
||||
var n = oSettings.aanFeatures.f;
|
||||
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
|
||||
{
|
||||
$(n[i]._DT_Input).val( sInput );
|
||||
if ( n[i]._DT_Input != document.activeElement )
|
||||
{
|
||||
$(n[i]._DT_Input).val( sInput );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user