From 1782fa8b630d6d1356b485257c04a833f0463093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Yves=20G=C3=A9rardy?= Date: Fri, 8 Dec 2017 21:27:23 +0100 Subject: [PATCH] render: fix perf regression introduced by #1918 --- docs/change-log.md | 2 +- render/render.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/change-log.md b/docs/change-log.md index 25e0a231..7bdc0478 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -41,7 +41,7 @@ - API: Event handlers, when set to literally `undefined` (or any non-function), are now correctly removed. - core: `xlink:href` attributes are now correctly removed - render: fixed an ommission that caused `oninit` to be called unnecessarily in some cases [#1992](https://github.com/MithrilJS/mithril.js/issues/1992) -- render: Render state correctly on select change event [#1916](https://github.com/MithrilJS/mithril.js/issues/1916) +- render: Render state correctly on select change event [#1916](https://github.com/MithrilJS/mithril.js/issues/1916) ([#1918](https://github.com/MithrilJS/mithril.js/pull/1918) [@robinchew](https://github.com/robinchew), [#2052](https://github.com/MithrilJS/mithril.js/pull/2052)) - render: fix various updateNodes/removeNodes issues when the pool and fragments are involved [#1990](https://github.com/MithrilJS/mithril.js/issues/1990), [#1991](https://github.com/MithrilJS/mithril.js/issues/1991), [#2003](https://github.com/MithrilJS/mithril.js/issues/2003), [#2021](https://github.com/MithrilJS/mithril.js/pull/2021) --- diff --git a/render/render.js b/render/render.js index a1478384..aed616aa 100644 --- a/render/render.js +++ b/render/render.js @@ -697,7 +697,7 @@ module.exports = function($window) { } } function isFormAttribute(vnode, attr) { - return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" && vnode.dom === $doc.activeElement || vnode.dom.parentNode === $doc.activeElement + return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" && vnode.dom === $doc.activeElement || vnode.tag === "option" && vnode.dom.parentNode === $doc.activeElement } function isLifecycleMethod(attr) { return attr === "oninit" || attr === "oncreate" || attr === "onupdate" || attr === "onremove" || attr === "onbeforeremove" || attr === "onbeforeupdate"