tobiu
25 Apr 2009, 12:10 AM
hi together,
like in my posting http://extjs.com/forum/showthread.php?p=320104#post320104
this bug is also still in the 3.0-rc1.
since the code is a bit different, i post the way to fix it here too.
Ext.form.Field
'side' : {
mark: function(field, msg){
field.el.addClass(field.invalidClass);
if(!field.errorIcon){
var elp = field.getErrorCt();
if(!elp){ // field has no container el
field.el.dom.title = msg;
return;
}
field.errorIcon = elp.createChild({cls:'x-form-invalid-icon'});
field.on('resize', field.alignErrorIcon, field); // inserted here
}
field.alignErrorIcon();
field.errorIcon.dom.qtip = msg;
field.errorIcon.dom.qclass = 'x-form-invalid-tip';
field.errorIcon.show();
// field.on('resize', field.alignErrorIcon, field); // removed
},
clear: function(field){
field.el.removeClass(field.invalidClass);
if(field.errorIcon){
field.errorIcon.dom.qtip = '';
field.errorIcon.hide();
// field.un('resize', field.alignErrorIcon, field); // removed
}else{
field.el.dom.title = '';
}
}
}
if you use
field.errorIcon.destroy();
instead of hiding it, removing the listener would be ok.
when hiding the icon and removing the listener and then resizing the window to a smaller width (containing a field that was marked and the mark got hidden), it will get scrollbars. tested only in ff3.
for screens, look at the 2.2.1 posting.
kind regards, tobiu
like in my posting http://extjs.com/forum/showthread.php?p=320104#post320104
this bug is also still in the 3.0-rc1.
since the code is a bit different, i post the way to fix it here too.
Ext.form.Field
'side' : {
mark: function(field, msg){
field.el.addClass(field.invalidClass);
if(!field.errorIcon){
var elp = field.getErrorCt();
if(!elp){ // field has no container el
field.el.dom.title = msg;
return;
}
field.errorIcon = elp.createChild({cls:'x-form-invalid-icon'});
field.on('resize', field.alignErrorIcon, field); // inserted here
}
field.alignErrorIcon();
field.errorIcon.dom.qtip = msg;
field.errorIcon.dom.qclass = 'x-form-invalid-tip';
field.errorIcon.show();
// field.on('resize', field.alignErrorIcon, field); // removed
},
clear: function(field){
field.el.removeClass(field.invalidClass);
if(field.errorIcon){
field.errorIcon.dom.qtip = '';
field.errorIcon.hide();
// field.un('resize', field.alignErrorIcon, field); // removed
}else{
field.el.dom.title = '';
}
}
}
if you use
field.errorIcon.destroy();
instead of hiding it, removing the listener would be ok.
when hiding the icon and removing the listener and then resizing the window to a smaller width (containing a field that was marked and the mark got hidden), it will get scrollbars. tested only in ff3.
for screens, look at the 2.2.1 posting.
kind regards, tobiu