Stache interfering with setting focus


On my login page, I want to set the focus on the first field.

I added a helper to do so

        $($('input')[0]).focus().css('background', 'yellow');
    }, 10);

The jquery call that is the guts works correctly in the console. The timeout allows the DOM to complete before it runs. If I console.dir() the selected DOM object, it’s the correct one. When I set it to a stupidly long length of time (10000), it still does nothing.

What am I missing?


Hi @tqwhite, I tried to replicate the issue in a JS Bin but it seems to work correctly for me in Chrome and Safari:,js,output

Does it work for you? If so, can you replicate the issue in another JS Bin?


Use the focused special event. Todomvc guide shows it.