-
Notifications
You must be signed in to change notification settings - Fork 781
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
input readonly list-attribute #179
Comments
@marcusasplund Hi 👋! I just woke up, so I haven't looked at this in good detail, but smells like another use case we fixed with keys #172? @zaceno Do you have any comments? |
@jbucaran - Looked at the glitch-example @marcusasplund provided. As far as I can tell, it's got not nothing to do with keys. Not sure exactly what the problem is. The relevant lines of code are (in
the line that throws the exception is The thing I don't get, though, is: We already do Even though using keys won't fix the issue, the |
@zaceno Yup. I tried to switch from 0.7.1 to src from master in the glitch provided. Same behaviour. But commenting out line 184 in src/hyperapp/app.js (in the glitch) all elements renders and works as expected. |
@marcusasplund This is a bug then, perhaps we need to be careful about some attributes or just turn off "use strict", which I'm almost sure if you can turn it off the problem would go away. |
I ran the tests on master with the line @jorgebucaran, do you know off hand of any reason why we need the (Side note: the reason I took out the entire code block surrounding that line, is because it was dealing with selectionStart/End in text inputs. I think now that we have keys, that's all more of a 'nice to have' rather than a 'must have', since a user could just key their textinput and the problem would be solved. Sure it's a little bit of a hassle for the user, but if we need to get rid of bytes, it's an option :) ) |
Well for once we use element[name] = value to set event handlers.
This tells me, that we're lacking on tests then! |
@marcusasplund Is there any reason why you use |
@dodekeract Nope. |
@marcusasplund I seriously need to rewrite the entire todomvc app. When I first wrote it, I used Hyperx, later I tried to rewrite it in JSX, but didn't do a great job at it. So now it's not really clear what it is. Things will get better after 0.8.0! 🙏 |
@jorgebucaran: Ah, that makes sense. I have some thoughts for a PR to fix this, but I'm going to hold off until 0.8.0. There's enough dust in the air :) Either way, I agree: clearly more tests are needed if I can comment out an entire code block with no tests failing 😛 |
@marcusasplund I think this is fixed in >=0.8.1. Can you give it a shot? 🙏 |
Yup. I can confirm that it works as expected now. Good work! |
Fails in rendering an input with attribute 'list' user for targeting datalist-element
Removing the attribute renders both input and datalist elements, then unconnected and useless of course.
Console message:
Cannot assign to read only property 'list' of object '#'
at setElementData...
Reproduced in glitch
https://glitch.com/edit/#!/wry-autocomplete
The text was updated successfully, but these errors were encountered: