浏览代码

fix volatile attributes (#2278)

Evan Almloff 1 年之前
父节点
当前提交
26c109f661
共有 1 个文件被更改,包括 3 次插入1 次删除
  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,