Browse Source

fix volatile attributes (#2278)

Evan Almloff 1 year ago
parent
commit
26c109f661
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/core/src/diff/node.rs

+ 3 - 1
packages/core/src/diff/node.rs

@@ -367,7 +367,9 @@ impl VNode {
                             std::cmp::Ordering::Equal => {
                                 let old = old_attributes_iter.next().unwrap();
                                 let new = new_attributes_iter.next().unwrap();
-                                if old.value != new.value {
+                                // Volatile attributes are attributes that the browser may override so we always update them
+                                let volatile = old.volatile;
+                                if volatile || old.value != new.value {
                                     self.write_attribute(
                                         path,
                                         new,