diff --git a/examples/todoapp/todoapp.nim b/examples/todoapp/todoapp.nim index f74abc3..0caa70c 100644 --- a/examples/todoapp/todoapp.nim +++ b/examples/todoapp/todoapp.nim @@ -90,7 +90,7 @@ proc createEntry(id: int; d: cstring; completed, selected: bool): VNode {.compac else: input(class = "edit", name = "title", key=id, onblur = focusLost, - onkeyupenter = editEntry, value = d, setFocus) + onkeyupenter = editEntry, value = d, setFocus=true) proc makeFooter(entriesCount, completedCount: int): VNode {.compact.} = result = buildHtml(footer(class = "footer")): diff --git a/src/karaxdsl.nim b/src/karaxdsl.nim index 47cd761..15c6fc6 100644 --- a/src/karaxdsl.nim +++ b/src/karaxdsl.nim @@ -86,7 +86,7 @@ proc tcall2(n, tmpContext: NimNode): NimNode = elif key in SpecialAttrs: result.add newDotAsgn(tmp, key, x[1]) elif eqIdent(key, "setFocus"): - result.add newCall(x, tmp, x[1], ident"kxi") + result.add newCall(key, tmp, x[1], ident"kxi") else: result.add newCall(bindSym"setAttr", tmp, newLit(key), x[1]) elif ck != ComponentKind.Tag: