Commit daf39f44 authored by Robert Lyon's avatar Robert Lyon Committed by Aaron Wells

Adjusting styles on cloned textarea for correct dimensions (Bug #1382890)

Appending the textarea to body was not taking in account for the

Change-Id: Icc06b16d8b8028121af1929be9bada4322e71c82
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 3b4fa01e
......@@ -62,9 +62,12 @@ function PieformTextarea(element, fullwidth) {//{{{
// add it to the dom, find the dimensions, then remove it.
this.actual = function(element) {
var target = false;
var style = {'position': 'absolute !important', 'top': '-2000 !important'};
target = getElement(element).cloneNode(true);
setStyle(target, style);
setStyle(target, {'position': 'absolute',
'top': '-2000px',
'width': 'auto',
'box-sizing': 'border-box',
'font-size': '0.75em'});
appendChildNodes(currentDocument().body, target);
var actual = getElementDimensions(target);
removeElement(target);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment