on master help sign in
Fix links, hopefully for real this time
commit94d6f7f471089bb4e0e4411fb6c6640d1bae624c authorEvan Czaplicki <info@elm-lang.org> dateFri 2 Aug 2013, 17:26 (13 years ago) parente4e8d89
1 file changed+11−3
runtime/Render/Element.js+11−3
runtime/Render/Element.js+11−3
@@ -23,6 +23,8 @@ function setProps(props, e) {
2323 a.style.top = 0;
2424 a.style.left = 0;
2525 a.style.display = 'block';
26+ a.style.position = 'absolute';
27+ e.style.position = 'relative';
2628 e.appendChild(a);
2729 }
2830 if (props.hover.ctor !== '_Tuple0') {
@@ -259,10 +261,16 @@ function updateProps(node, curr, next) {
259261 if (currP.href === '') {
260262 var a = newElement('a');
261263 a.href = props.href;
262− a.appendChild(e);
263− e.parentNode.replaceChild(a,e);
264+ a.style.width = '100%';
265+ a.style.height = '100%';
266+ a.style.top = 0;
267+ a.style.left = 0;
268+ a.style.display = 'block';
269+ a.style.position = 'absolute';
270+ e.style.position = 'relative';
271+ e.appendChild(a);
264272 } else {
265− node.parentNode.href = props.href;
273+ node.lastNode.href = props.href;
266274 }
267275 }
268276}