on master help sign in
Make sure text boxes are given proper dimensions after hot-swapping
a633a5dEvan Czaplicki
libraries/Native/Utils.js+2−2
@@ -115,11 +115,11 @@ Elm.Native.Utils = function(elm) {
115 t.style.styleFloat = "left";
115 t.style.styleFloat = "left";
116 t.style.cssFloat = "left";
116 t.style.cssFloat = "left";
117
117
118− elm.node.appendChild(t);
118+ document.body.appendChild(t);
119 var style = window.getComputedStyle(t, null);
119 var style = window.getComputedStyle(t, null);
120 var w = Math.ceil(style.getPropertyValue("width").slice(0,-2) - 0);
120 var w = Math.ceil(style.getPropertyValue("width").slice(0,-2) - 0);
121 var h = Math.ceil(style.getPropertyValue("height").slice(0,-2) - 0);
121 var h = Math.ceil(style.getPropertyValue("height").slice(0,-2) - 0);
122− elm.node.removeChild(t);
122+ document.body.removeChild(t);
123 return Tuple2(w,h);
123 return Tuple2(w,h);
124 }
124 }
125
125