Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Karax input text becoming null #254

Closed
thatrandomperson5 opened this issue Apr 22, 2023 · 1 comment
Closed

Karax input text becoming null #254

thatrandomperson5 opened this issue Apr 22, 2023 · 1 comment

Comments

@thatrandomperson5
Copy link
Contributor

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

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
@geotre
Copy link
Collaborator

geotre commented Apr 23, 2023

Thank you for reporting this issue @thatrandomperson5 . It appears you have hit the same bug that was reported in #117. PR above will fix it.

@geotre geotre closed this as completed May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants