Fixed JS focus bug to close #290