1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 11:58:00 +01:00

Make autosize calculation less silly (and fix some CSS)

This commit is contained in:
Kris Maglione
2008-10-10 04:43:09 +00:00
parent baf2480b75
commit ec68f69b4b
2 changed files with 7 additions and 14 deletions

View File

@@ -1258,19 +1258,8 @@ liberator.ItemList = function (id) //{{{
function autoSize()
{
function getHeight()
{
if (completionElements.length == 0)
return Math.max(minHeight, doc.height);
minHeight = Math.max(minHeight,
completionElements[completionElements.length - 1]
.getBoundingClientRect().bottom);
return minHeight;
}
if (completionElements)
container.height = getHeight();
minHeight = Math.max(minHeight, completionBody.getBoundingClientRect().bottom);
container.height = minHeight;
}
doc.body.addEventListener("DOMSubtreeModified", autoSize, true);