Store normalized vnodes in the dom element. Add render tests. (#2266)
* Store normalized vnodes in the dom element. Add render tests. * Add entry to change-log
This commit is contained in:
parent
b9c3c6c9c8
commit
ea0ce7f762
3 changed files with 29 additions and 2 deletions
|
|
@ -865,8 +865,8 @@ module.exports = function($window) {
|
|||
// First time rendering into a node clears it out
|
||||
if (dom.vnodes == null) dom.textContent = ""
|
||||
|
||||
if (!Array.isArray(vnodes)) vnodes = [vnodes]
|
||||
updateNodes(dom, dom.vnodes, Vnode.normalizeChildren(vnodes), hooks, null, namespace === "http://www.w3.org/1999/xhtml" ? undefined : namespace)
|
||||
vnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])
|
||||
updateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === "http://www.w3.org/1999/xhtml" ? undefined : namespace)
|
||||
dom.vnodes = vnodes
|
||||
// document.activeElement can return null in IE https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement
|
||||
if (active != null && $doc.activeElement !== active && typeof active.focus === "function") active.focus()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue