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

Assigning to input list property broke again #622

Closed
vgalaktionov opened this issue Feb 25, 2018 · 4 comments
Closed

Assigning to input list property broke again #622

vgalaktionov opened this issue Feb 25, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@vgalaktionov
Copy link

Hey, first of all thanks a lot for your work on hyperapp.
I was getting overwhelmed with all the ceremony in modern frontend dev, hyperapp + parcel have proven to be the remedy.

I've ran into an issue with rendering an input with a list attribute. This has happened before in #179 but was resolved; however, I've updated the example to the latest hyperapp and it appears broken again:

index.js:139 Uncaught TypeError: Cannot assign to read only property 'list' of object '#<HTMLInputElement>'
    at setElementProp (index.js:139)
    at createElement (index.js:173)
    at createElement (index.js:169)
    at createElement (index.js:169)
    at patch (index.js:312)
    at render (index.js:58)

Example here: https://probable-preface.glitch.me/

@jorgebucaran jorgebucaran added the bug Something isn't working label Feb 25, 2018
@jorgebucaran
Copy link
Owner

We need to change this:

https://github.com/hyperapp/hyperapp/blob/a7cf41933f98e1474a90b66dec7c8adbb2fe93d6/src/index.js#L140

...to something like this:

if (typeof value === "function" || (name in element && name !== "list" && !isSVG)) {

@vgalaktionov
Copy link
Author

Yeah, that's exactly what I did on my fork and it works for me now. Should I make a PR?

@jorgebucaran
Copy link
Owner

@vgalaktionov Sure! 👍

@jorgebucaran
Copy link
Owner

Resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants