Open hesxenon opened 11 months ago
I've forked your repository and after some experiments my manual tests seem to do what I'd expect. You can find the source here: https://github.com/hesxenon/idiomorph/blob/main/src/idiomorph.js#L350
I'd be glad to open a PR if you agree with the premise of this issue and if you tell me how to run your test suite :wink: - because I only got a conn refused from mocha-chrome :sweat_smile:
Since it is possible(-ish) to work around this feel free to close this issue, but imho the current behaviour around input values is wrong/confusing.
Consider the following structure:
If I type something into this input and then do
I'd expect the inputs value to be preserved since nothing changed and an inputs
value
is only loosely coupled to the attribute of the same name, similar to the play state of a video.According to this part the value of an input is reset if
from
) does not have avalue
attributebeforeAttributeUpdate
callback does not return falseImho it would be better to simplify this to a mismatch in the value attribute like this:
to
(existing)from
(new content)from
from