-
-
Notifications
You must be signed in to change notification settings - Fork 924
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
Error when using CSS selector for input type and passing a special attribute #2622
Labels
Type: Bug
For bugs and any other unexpected breakage
Comments
Checked the generated hyperscript vnode, and it's an issue with property application order - the The fix would be special-casing |
Fixed by #2578. |
kfule
added a commit
to kfule/mithril.js
that referenced
this issue
Oct 21, 2024
… render.js with another workaround in hyperscript.js The input[type] inspection at the beginning of setAttr() was called for each attribute. This had a negative impact on performance. The new workaround in execSelector() controls the order of setting attributes by reordering the keys in attrs.
Merged
8 tasks
kfule
added a commit
to kfule/mithril.js
that referenced
this issue
Oct 26, 2024
… render.js with another workaround in hyperscript.js The input[type] inspection at the beginning of setAttr() was called for each attribute. This had a negative impact on performance. The new workaround in execSelector() controls the order of setting attributes by reordering the keys in attrs.
dead-claudia
pushed a commit
that referenced
this issue
Oct 31, 2024
…s with another workaround in hyperscript.js The input[type] inspection at the beginning of setAttr() was called for each attribute. This had a negative impact on performance. The new workaround in execSelector() controls the order of setting attributes by reordering the keys in attrs.
Merged
dead-claudia
pushed a commit
that referenced
this issue
Oct 31, 2024
…s with another workaround in hyperscript.js The input[type] inspection at the beginning of setAttr() was called for each attribute. This had a negative impact on performance. The new workaround in execSelector() controls the order of setting attributes by reordering the keys in attrs.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Creating a vnode with a CSS selector for
input[type=date]
and assigning special IDL attributevalueAsNumber
fails with an error message.Could be related to attribute precedence:
https://mithril.js.org/hyperscript.html#attributes-passed-as-the-second-argument
Mithril version: 2.0.4
Browser and OS: Firefox 80.0 / Ubuntu 20.04
Code
Fiddle: https://jsfiddle.net/mhz74q8v/
Expected Behavior
Defining a
data[type=input]
and setting the special attributevalueAsNumber
should work.Current Behavior
An error is thrown:
InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable
The text was updated successfully, but these errors were encountered: