@thi.ng/hdom
Advanced tools
Comparing version 3.0.27 to 3.0.28
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="3.0.28"></a> | ||
## [3.0.28](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom@3.0.27...@thi.ng/hdom@3.0.28) (2018-07-10) | ||
### Bug Fixes | ||
* **hdom:** always update "value" attrib last in diffAttributes() ([126103b](https://github.com/thi-ng/umbrella/commit/126103b)) | ||
<a name="3.0.27"></a> | ||
@@ -8,0 +19,0 @@ ## [3.0.27](https://github.com/thi-ng/umbrella/compare/@thi.ng/hdom@3.0.26...@thi.ng/hdom@3.0.27) (2018-07-04) |
19
diff.js
@@ -12,2 +12,3 @@ "use strict"; | ||
const diffObject = diff.diffObject; | ||
const SEMAPHORE = Symbol("SEMAPHORE"); | ||
/** | ||
@@ -128,2 +129,3 @@ * Takes a DOM root element and two hiccup trees, `prev` and `curr`. | ||
dom_1.removeAttribs(el, delta.dels, prev); | ||
let value = SEMAPHORE; | ||
for (edits = delta.edits, i = edits.length; --i >= 0;) { | ||
@@ -135,8 +137,21 @@ e = edits[i]; | ||
} | ||
dom_1.setAttrib(el, a, e[1], curr); | ||
if (a !== "value") { | ||
dom_1.setAttrib(el, a, e[1], curr); | ||
} | ||
else { | ||
value = e[1]; | ||
} | ||
} | ||
for (edits = delta.adds, i = edits.length; --i >= 0;) { | ||
e = edits[i]; | ||
dom_1.setAttrib(el, e, curr[e], curr); | ||
if (e !== "value") { | ||
dom_1.setAttrib(el, e, curr[e], curr); | ||
} | ||
else { | ||
value = curr[e]; | ||
} | ||
} | ||
if (value !== SEMAPHORE) { | ||
dom_1.setAttrib(el, "value", value, curr); | ||
} | ||
} | ||
@@ -143,0 +158,0 @@ function extractEquivElements(edits) { |
{ | ||
"name": "@thi.ng/hdom", | ||
"version": "3.0.27", | ||
"version": "3.0.28", | ||
"description": "Lightweight vanilla ES6 UI component & virtual DOM system", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77261
815