-
Notifications
You must be signed in to change notification settings - Fork 129
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
playsinline
attribute is set wrong in hydrated output version
#384
Comments
I sympathise with the expectation, but the cost of such expectation is high. I will list a few arguments:
That's what just came to mind |
Thank you for the quick answer!
I'm not sure if there's a misunderstanding, I don't care if I write
Sure, as long as the types say what I should write I'm fine with either casing.
Aha interesting. Yeah that would be great. Honestly wondered when I looked at the output the first time why So you're saying if I write Edit: Seems like it does. Ugh, do I have to edit my less elegant workaround now? Ok but then I really hope your MR gets merged soon to remove the boolean from the types and just allow
Ahh I didn't know about prop:* Yeah again I don't care as long as I in my IDE can type |
Yes, that's the preferred way, because it gets inlined in the template and cloned directly without having to do any
Boolean attributes are present or not present, these don't have a An easy way to understand boolean attributes is:
In an example https://playground.solidjs.com/anonymous/33012fcc-ff7b-470d-b38e-a02c9b5d7dc5 So the preferred way would be |
Okay but if anything is valid as the attribute value and it's just set as long as it exists, then setting I think it's a bug that just following my IDE recommendations doesn't work to make the video play inline. As a user, knowing I have to set it to anything but |
Right, I will add a PR for that case |
Thank you @titoBouzout! |
Added here #385 |
What happens:
videoElement.playsinline === true
but the browser only respectsvideoElement.playsInline === true
To fix, solid-js should set
videoElement.playsInline
instead.To reproduce: go to https://playground.solidjs.com/anonymous/65323853-6f9d-4954-9b03-2ffd622769ce and select "output"
You will see the output is correct for "client side rendering"
Now, at the bottom, switch compile mode to "Client side rendering with hydration"
You will now notice that solid-js changes the wrong property on the video element
The text was updated successfully, but these errors were encountered: