Choleriker
10-22-2007, 07:18 AM
Hello,
i have input-fields in cards. When im switching between the cards and an input is focused in an hidden card, ie letz blink the cursor over the actual card. For this i have written an helper, which focuses an input field which isnt in view-port.
This only works in an layout without a page scrollbar.
Ext.disableFocus = function() {
if(!Ext.isIE) return;
var f = Ext.get('disable-focus-input');
if(!f) {
f = Ext.DomHelper.append(document.body, {
tag:'input', style:'position:absolute;top:-1000;left:-1000;'
}, true);
}
f.dom.focus();
};
i have input-fields in cards. When im switching between the cards and an input is focused in an hidden card, ie letz blink the cursor over the actual card. For this i have written an helper, which focuses an input field which isnt in view-port.
This only works in an layout without a page scrollbar.
Ext.disableFocus = function() {
if(!Ext.isIE) return;
var f = Ext.get('disable-focus-input');
if(!f) {
f = Ext.DomHelper.append(document.body, {
tag:'input', style:'position:absolute;top:-1000;left:-1000;'
}, true);
}
f.dom.focus();
};