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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user