cheesegrits
Support Gopher
OK, it definitely seems to be a timing thing.
If I do this:
... then when the box pops up, everything is selected, BEFORE the enclosure function fires. Which means that seems to be some artifact of IE, rather than us. Problem is, for reasons I don't quite understand, the el I'm passing to the func is null when the function actually runs, although it exists at the point I fire the setTimeout, so setting the focus isn't working.
Anyway, I suspect this may be the approach we have to take, unless Rob has a more elegant solution.
-- hugh
If I do this:
Code:
setFocus : function (td) {
if (typeOf(td.getElement('.fabrikinput')) !== 'null') {
var el = td.getElement('.fabrikinput');
setTimeout(function (el) {
el.focus();
}, 1000);
}
},
... then when the box pops up, everything is selected, BEFORE the enclosure function fires. Which means that seems to be some artifact of IE, rather than us. Problem is, for reasons I don't quite understand, the el I'm passing to the func is null when the function actually runs, although it exists at the point I fire the setTimeout, so setting the focus isn't working.
Anyway, I suspect this may be the approach we have to take, unless Rob has a more elegant solution.
-- hugh