From bfa1767d812467437091f48c8c567cedb0227277 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Fri, 6 Mar 2015 09:00:22 -0500 Subject: [PATCH] #469 allow html5 values w/ units for width/height attrs --- mithril.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mithril.js b/mithril.js index 2997b392..ec7192ff 100644 --- a/mithril.js +++ b/mithril.js @@ -361,7 +361,7 @@ var m = (function app(window, undefined) { //handle cases that are properties (but ignore cases where we should use setAttribute instead) //- list and form are typically used as strings, but are DOM element references in js //- when using CSS selectors (e.g. `m("[style='']")`), style is used as a string, but it's an object in js - else if (attrName in node && !(attrName === "list" || attrName === "style" || attrName === "form" || attrName === "type")) { + else if (attrName in node && !(attrName === "list" || attrName === "style" || attrName === "form" || attrName === "type" || attrName === "width" || attrName === "height")) { //#348 don't set the value if not needed otherwise cursor placement breaks in Chrome if (tag !== "input" || node[attrName] !== dataAttr) node[attrName] = dataAttr }