on master help sign in
Make sure text boxes are given proper dimensions after hot-swapping
commita633a5d7d31fd851eebe6a64514046fe8d80af6c authorEvan Czaplicki <info@elm-lang.org> dateTue 3 Sep 2013, 11:25 (13 years ago) parentbdd8213
1 file changed+2−2
libraries/Native/Utils.js+2−2
libraries/Native/Utils.js+2−2
@@ -115,11 +115,11 @@ Elm.Native.Utils = function(elm) {
115115 t.style.styleFloat = "left";
116116 t.style.cssFloat = "left";
117117
118− elm.node.appendChild(t);
118+ document.body.appendChild(t);
119119 var style = window.getComputedStyle(t, null);
120120 var w = Math.ceil(style.getPropertyValue("width").slice(0,-2) - 0);
121121 var h = Math.ceil(style.getPropertyValue("height").slice(0,-2) - 0);
122− elm.node.removeChild(t);
122+ document.body.removeChild(t);
123123 return Tuple2(w,h);
124124 }
125125