PDA

View Full Version : [CLOSED][3.1.1] Strange behavior with LoadMask and Opera 10.50 Beta



dtex-lab
21 Feb 2010, 4:36 AM
If I instance a LoadMask as a global type, Opera 10.5 Beta have a strange behavior.
When I call the hide() function, the message disappear... but windows is "freezed"..

With FF, IE or Chrome it is working fine.

As workaround is enough to set global variable in the onReady function..
but I believe it is a bug.

this is a test case:



<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<link rel="stylesheet" type="text/css" href="lib/extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="lib/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="lib/extjs/ext-all.js"></script>
<script>
var WAITING_MASK = new Ext.LoadMask(Ext.getBody(), {
msg: "waiting opera..."
});
//var WAITING_MASK = null;
Ext.onReady(function () {
// IF I MOVE THE WAITING_MASK DECLARATION HERE IT IS WORKING.
//var WAITING_MASK = new Ext.LoadMask(Ext.getBody(), {msg:"waiting opera..."});
//WAITING_MASK = new Ext.LoadMask(Ext.getBody(), {msg:"waiting opera..."});
WAITING_MASK.show();
new Ext.Viewport({
layout: 'fit',
items: {
xtype: "form",
items: {
xtype: 'textfield',
fieldLabel: "test field"
}
}
});
WAITING_MASK.hide();
})
</script>
</head>
</body>
</html>


If you change


var WAITING_MASK = new Ext.LoadMask(Ext.getBody(), {
msg: "waiting opera..."
});
//var WAITING_MASK = null;
...
//var WAITING_MASK = new Ext.LoadMask(Ext.getBody(), {msg:"waiting opera..."});
//WAITING_MASK = new Ext.LoadMask(Ext.getBody(), {msg:"waiting opera..."});
WAITING_MASK.show();


to

//var WAITING_MASK = new Ext.LoadMask(Ext.getBody(), {
msg: "waiting opera..."
});
var WAITING_MASK = null;
...
//var WAITING_MASK = new Ext.LoadMask(Ext.getBody(), {msg:"waiting opera..."});
WAITING_MASK = new Ext.LoadMask(Ext.getBody(), {msg:"waiting opera..."});
WAITING_MASK.show();


it is working with all browsers

Ty

evant
21 Feb 2010, 5:15 AM
Because it's trying to get a reference to the document body. Any dom related calls should be inside an onReady block.