It's quite peculiar. I'm working with a Sammy.js application, and my goal is to set the focus on a text field as soon as the HTML loads. Here's the CoffeeScript code snippet I've written:
this.partial('templates/my-template.jqt').then ->
i = $('#item')
debugger
i.focus()
During the debug session, right at that line, I can examine "i" and confirm that it's a JQuery object. Surprisingly, I am able to update the text field by calling i.val("HI THERE!"). However, the command i.focus() seems to have no effect whatsoever. Could there be a security feature preventing me from focusing on a dynamically loaded text element?