Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <2471865.AAA9jsC1C5@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Thu, 28 Feb 2013 20:50:26 +0100 User-Agent: KNode/4.8.5 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. MIME-Version: 1.0 Lines: 26 NNTP-Posting-Date: 28 Feb 2013 20:50:26 CET NNTP-Posting-Host: 2da5c142.newsspool3.arcor-online.net X-Trace: DXC=@3WKEj8U[>_Fm0Y?OE@2^XMcF=Q^Z^V3X4Fo<]lROoRQ8kFYBYU3JEo]c31Mhen\E5U X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:18664 Tim Slattery wrote: > My function creates a new element. It then attempts > to set the focus on the new element. Like this: > > o = document.getElementById("putithere"); > o.innerHTML = ''; > document.getElementById("newbox").focus(); > > "putithere" is the id of an empty
. The id of the new element is > dynamically generated in the real function, but the test function > works the same way. > > In IE and Chrome, this works just fine. The new box appears and it has > the focus. But in Firefox the focus stays on the button that launched > the function! Can I make Firefox handle this like IE and Chrome? Probably not. But avoiding “innerHTML” could help there; it would also be more efficient. You looked and there were no relevant errors in the console, yes? -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.