mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-08 05:33:32 +02:00
Resize the completion buffer on DOMSubtreeModified event
This commit is contained in:
@@ -1248,12 +1248,10 @@ liberator.ItemList = function (id) //{{{
|
|||||||
return minHeight;
|
return minHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
var height = getHeight();
|
if (completionElements)
|
||||||
if (height == 0) // sometimes we don't have the correct size at this point
|
container.height = getHeight();
|
||||||
setTimeout(function () { container.height = getHeight(); }, 10);
|
|
||||||
else
|
|
||||||
container.height = height;
|
|
||||||
}
|
}
|
||||||
|
doc.body.addEventListener("DOMSubtreeModified", autoSize, true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* uses the entries in completions to fill the listbox
|
* uses the entries in completions to fill the listbox
|
||||||
@@ -1308,12 +1306,10 @@ liberator.ItemList = function (id) //{{{
|
|||||||
}
|
}
|
||||||
|
|
||||||
let dom = liberator.util.xmlToDom(div, doc);
|
let dom = liberator.util.xmlToDom(div, doc);
|
||||||
doc.body.appendChild(dom);
|
|
||||||
|
|
||||||
completionBody = dom.getElementsByTagName("tbody")[0];
|
completionBody = dom.getElementsByTagName("tbody")[0];
|
||||||
completionElements = completionBody.childNodes;
|
completionElements = completionBody.childNodes;
|
||||||
|
doc.body.appendChild(dom);
|
||||||
|
|
||||||
autoSize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
|
|||||||
Reference in New Issue
Block a user