Closed RCohenE5Group closed 8 years ago
This is a strange one. Even if a parent element is invisible it shouldn't be null
, right? The only thing I can think of is to check for elem.parentNode
prior to referencing:
ss.isVisible = function( elem ) {
"use strict";
if ( !elem ) {
return false;
}
if ( elem.nodeType !== 1 || elem == document.body ) {
elem = null;
return true;
}
if ( elem.parentNode &&
( elem.offsetWidth > 0 ||
elem.offsetHeight > 0 ||
ss.getStyle( elem, 'display' ).toLowerCase() != 'none' ) )
{
return ss.isVisible( elem.parentNode );
}
elem = null;
return false;
};
I'm about to push an update with this change now (it will be version 2.5.4).
I'm going to close this issue, but if this doesn't fix the problem please re-open the issue and we'll figure out another approach.
version 2.5.5 fixed the problem. Thanks.
Hello I use Simple Ajax Uploader Version 2.5.3 , and have the following error :
Uncaught TypeError: Cannot read property 'nodeType' of null
SimpleAjaxUploader.js:389In debug mode I find that elem.parentNode==null. I'm not sure but I think this is because the div containing "upload" button is hidden by jquery tabs(). In that context, it seems that parentNode can be null, which is not tested in the recursivity of isVisible() :
`ss.isVisible = function( elem ) { "use strict";
}; `
Thanks for your help.