yandel 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node.js +17 -3
- package/package.json +1 -1
package/dist/node.js
CHANGED
|
@@ -341,7 +341,8 @@ function _remove_html_prop(dom, props, prop) {
|
|
|
341
341
|
}
|
|
342
342
|
catch (error) { }
|
|
343
343
|
}
|
|
344
|
-
|
|
344
|
+
else
|
|
345
|
+
dom.removeAttribute(prop);
|
|
345
346
|
}
|
|
346
347
|
function _get_props_diff(a, b) {
|
|
347
348
|
const _to_remove = {};
|
|
@@ -438,6 +439,10 @@ class TagNode extends Node {
|
|
|
438
439
|
_clear_props(this._dom, diff.remove);
|
|
439
440
|
_apply_props(this._dom, diff.apply);
|
|
440
441
|
this._props = nprops;
|
|
442
|
+
if (this.tag === "input" &&
|
|
443
|
+
!("value" in diff.apply && "value" in diff.remove)) {
|
|
444
|
+
this._dom.value = "";
|
|
445
|
+
}
|
|
441
446
|
}
|
|
442
447
|
else {
|
|
443
448
|
this._props = nprops;
|
|
@@ -523,8 +528,17 @@ class TagNode extends Node {
|
|
|
523
528
|
_apply_props(this._dom, this._props);
|
|
524
529
|
}
|
|
525
530
|
}
|
|
526
|
-
else
|
|
527
|
-
|
|
531
|
+
else {
|
|
532
|
+
// DOM not created yet
|
|
533
|
+
if (this._props) {
|
|
534
|
+
if (t.props)
|
|
535
|
+
this._diff_dom_props(t.props);
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
this._props = t.props ? t.props : undefined;
|
|
539
|
+
}
|
|
540
|
+
this.create();
|
|
541
|
+
}
|
|
528
542
|
}
|
|
529
543
|
else {
|
|
530
544
|
// Tag has changed
|