Explore the community Forums Lectora Lectora Questions & Answers focus() not working Reply To: focus() not working

#380560 Score: 0
Profile photo of Cam Phillips
Cam Phillips
Member
beginner
intermediate
friend finder
wise owl
curious george
contributor
19 pts
@_

Hello Mihir!! Long time no chat, how are things going for you?

After a bit of reading, it appears that IE11 runs the focus() method before all of the page elements have been rendered correctly – one user suggests adding a small delay

setTimeout(function() { document.getElementById('button100052').focus(); }, 10);

More here: http://www.mkyong.com/javascript/focus-is-not-working-in-ie-solution/

See if this works – typical IE…

Cheers!

Cam