mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-18 11:52:11 +01:00
Fix: Ie9 throws an error when document.activeElement is used inside a frame or iframe... So need to wrap the test up in a try/catch. Nasty.
This commit is contained in:
parent
bd6bb74967
commit
26d2926390
11
media/js/jquery.dataTables.js
vendored
11
media/js/jquery.dataTables.js
vendored
@ -5622,8 +5622,15 @@
|
|||||||
var n = oSettings.aanFeatures.f;
|
var n = oSettings.aanFeatures.f;
|
||||||
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
|
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
|
||||||
{
|
{
|
||||||
if ( n[i]._DT_Input != document.activeElement )
|
// IE9 throws an 'unknown error' if document.activeElement is used
|
||||||
{
|
// inside an iframe...
|
||||||
|
try {
|
||||||
|
if ( n[i]._DT_Input != document.activeElement )
|
||||||
|
{
|
||||||
|
$(n[i]._DT_Input).val( sInput );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch ( e ) {
|
||||||
$(n[i]._DT_Input).val( sInput );
|
$(n[i]._DT_Input).val( sInput );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -683,8 +683,15 @@ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseIns
|
|||||||
var n = oSettings.aanFeatures.f;
|
var n = oSettings.aanFeatures.f;
|
||||||
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
|
for ( var i=0, iLen=n.length ; i<iLen ; i++ )
|
||||||
{
|
{
|
||||||
if ( n[i]._DT_Input != document.activeElement )
|
// IE9 throws an 'unknown error' if document.activeElement is used
|
||||||
{
|
// inside an iframe or frame...
|
||||||
|
try {
|
||||||
|
if ( n[i]._DT_Input != document.activeElement )
|
||||||
|
{
|
||||||
|
$(n[i]._DT_Input).val( sInput );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch ( e ) {
|
||||||
$(n[i]._DT_Input).val( sInput );
|
$(n[i]._DT_Input).val( sInput );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user