Closed Perfect-Chaos closed 4 years ago
This is unrelated to Vue as changing the input's checked
property manually doesn't trigger the mutation observer either. In Vue, you wouldn't use a Mutation Observer anyway, you would use a watch
to do side effects.
Remember to use the forum or the Discord chat to ask questions!
Version
2.6.11
Reproduction link
https://jsfiddle.net/dc57vkfm/
Steps to reproduce
Connect a MutationObserer to a Vue-Component with "v-bind:checked" and "v-bind:disabled". Then let both states (checked & disabled) change...
What is expected?
Both changes fire an according mutation.
What is actually happening?
Only the change in "disabled" fires a mutation. The change in "checked" is unnoticed.
Noticed this strange behaviour while migrating an old AngularJS1 application to vue.js.
I changed "ng-checked" to "v-bind:checked" and "ng-disabled" to "v-bind:disabled" and all seemed to work well but the existing MutationObserver now only detects the changes of the "disabled" attribute. In AngularJS1 both mutations were fired.