Allow editing of settings

This commit is contained in:
2017-06-24 02:10:04 +02:00
parent 3fcb1bc36e
commit 8d976488ee
4 changed files with 15 additions and 3 deletions

View File

@ -48,6 +48,11 @@ export class Diff {
a.setAttribute(attrib.name, b.getAttribute(attrib.name))
}
}
// Special case: Apply state of input elements
if(a !== document.activeElement && a instanceof HTMLInputElement && b instanceof HTMLInputElement) {
a.value = b.value
}
}
Diff.childNodes(a, b)
@ -57,7 +62,7 @@ export class Diff {
static innerHTML(aRoot: HTMLElement, html: string) {
let bRoot = document.createElement("main")
bRoot.innerHTML = html
Diff.childNodes(aRoot, bRoot)
}
}