Get input text being called twice on a node that is found by parentNode.getVNodeById() returns null on the second time. First time returns expected output.
Reproducible Example
include karax / prelude
import karax / [kdom]
proc createDom(): VNode =
result = buildHtml(tdiv):
form:
input(id="username", placeholder="Username")
input(`type`="submit")
proc onsubmit(ev: Event, node: VNode) =
ev.preventDefault()
let username = node.getVNodeById("username").getInputText
echo username
# To see value without error use 'asm "console.log(`username`);"' instead
setRenderer createDom
Issue
Get input text being called twice on a node that is found by
parentNode.getVNodeById()
returns null on the second time. First time returns expected output.Reproducible Example