Your jsfiddle works for me if I make it have valid HTML. See:
http://jsfiddle.net/cmw0qbz5/2/
But that’s not really the point of this thread. We want to make sure that the “autofocus” attribute in scalawags works. My version of scalatags.generic.Attrs contains this:
/**
* This Boolean attribute lets you specify that a form control should have
* input focus when the page loads, unless the user overrides it, for example
* by typing in a different control. Only one form element in a document can
* have the autofocus attribute, which is a Boolean. It cannot be applied if
* the type attribute is set to hidden (that is, you cannot automatically set
* focus to a hidden control).
*
* MDN
*/
val autofocus = "autofocus".attr := "autofocus"
Note that autofocus here is defined WITH a value (“autofocus”) so it shouldn’t need one in your code. You should be able to do, simply:
input(type=“text”,autofocus)
Does this not work for you?
Reid.