PDA

View Full Version : [CLOSED][3.0.0] wrap.parentNode is null - ext-all-debug.js Line 7991



cparker
20 Jul 2009, 1:28 PM
Ext version tested:

Ext 3.0 rev 0


Adapter used:

ext


css used:

custom css


Browser versions tested against:

Internet Explorer
Firefox 3.0.1 (firebug 1.3.3 installed)
Google Chrome 2.0.172.37


Operating System:

Windows XP Professional


Description:

I am unable to consistently implement the sliding message headline found at the top-right of extjs.com with Ext JS 3.0. I implemented it with Ext 2.2 (more or less copy/paste with some display changes) without an issue. When I replaced Ext JS 2.2 with Ext JS 3.0, I started receiving errors.

Internet Explorer:
Line: 7991
Error: 'parentNode' is null or not an object

Firefox with Firebug:
wrap.parentNode is null
http://localhost/js/ext-3.0.0/ext-all-debug.js
Line 7991

Google Chrome:
Uncaught TypeError: Cannot call method 'insertBefore' of null
localhost/js/ext-3.0.0/ext-all-debug.js:7991

Despite receiving this error (which is only thrown once), Firefox and Chrome render the animation anyway. Internet Explorer, however, stops rendering the animation altogether, even though the interval hasn't been cleared.

Line 7991 referenced refers to this line in fxUnwrap():


wrap.parentNode.insertBefore(dom, wrap);


Test Case:



<html>
<head>
<title>Message Test</title>

<script type="text/javascript" src="js/ext-3.0.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="js/ext-3.0.0/ext-all-debug.js"></script>

<script type="text/javascript">
Ext.onReady(function(){
// messages
var msgs = [
{text: 'Message 1'},
{text: 'Message 2'},
{text: 'Message 3'}
];

var msgIndex = 0;
var msg = Ext.get('msg'),
active = null;

msg.addClassOnOver('msg-over');

function doUpdate(){
msg.update(active.text);
msg.slideIn('t');
}

function showMsg(index){
if(!msg.hasClass('msg-over')) {
msgIndex = msgs[msgIndex + 1] ? msgIndex + 1 : 0;
active = msgs[index];

if(msg.isVisible()){
msg.slideOut('t', {
easing: 'easeOut',
duration: .5,
callback: doUpdate
});
}else{
doUpdate();
}
}
}

setInterval(function(){
showMsg(msgIndex);
}, 2500);
});
</script>

<style type="text/css" title="currentStyle" media="screen">
#msg { width: 10em; padding: 0.5em; background: #CCC; }
</style>
</head>
<body>
<div id="msg"></div>
</body>
</html>



Steps to reproduce the problem:

Load the page.


The result that was expected:

Animation continues to render as in Ext 2.2.


The result that occurs instead:

Animation stops in Internet Explorer. Errors are thrown in Internet Explorer, Firefox, and Google Chrome.


Screenshot or Video:

none


Debugging already done:

none


Possible fix:

not provided

evant
20 Jul 2009, 9:48 PM
Fairly sure this is already fixed in SVN, I remember a similar issue I fixed recently. Using your sample I can't reproduce any errors. Marking this one as closed.

mjlecomte
23 Jul 2009, 10:04 AM
I tested provided test case against 3.0.0 and saw the error and 3.0 svn and did not see the error, so yes, this appears to have been resolved at some point.

Yazla
4 Sep 2009, 6:53 AM
Hi, i have the same problem, is there some solution?
Thanks.

Cheers.