Closed pizzathemeguy closed 1 month ago
Ah thank you for investigating this. I think this might be a regression: I'll take a look :)
Hey there I think I've fixed this, could you give 4.2.2 a try and see if the issue is resolved?
Gave 4.2.2 a try in the example I posted as well as the project I originally noticed the behavior in; both looked good. Appreciate it, thank you!
When an element has the attribute
attribute.disabled(True)
it toggles between disabled and enabled on every event. I suspect this will happen with all theas_property
attributes, but I've not tested anything other than disabled.e.g. In this example every time the "raise event" button is pressed the "I should always be disabled" button toggles between disabled/enabled.
from what I could tell was happening in
vdom.ffi.mjs createElementNode()
:attr.as_property
on line235
is trueif (canMorph) prevAttributes.delete(name);
that happens foras_property=False
attributes is not called303
the attribute gets removed withel.removeAttribute(attr);
I didn't have a chance to dig into the code more to see if adding
if (canMorph) prevAttributes.delete(name);
to theas_property=True
condition would have other downstream effects, but that at the very least fixed the toggling button I was seeing.