mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 14:22:27 +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);
|
||||
|
||||
|
||||
@@ -72,6 +72,10 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
||||
|
||||
*:-moz-loading, *:-moz-broken { display: none !important; }
|
||||
|
||||
.completion-items {
|
||||
width: 100%;
|
||||
display: table;
|
||||
}
|
||||
.compitem {
|
||||
display: table-row;
|
||||
}
|
||||
@@ -81,7 +85,7 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
||||
vertical-align: middle;
|
||||
padding: 0 .5ex;
|
||||
}
|
||||
.compitem-td-span { height: 1.5em; display: block; }
|
||||
.compitem-td-span { height: 1.5em; display: block; min-height: 16px; }
|
||||
|
||||
.compitem[selected=true] { background-color: yellow; }
|
||||
.compitem > .favicon { width: 16px; }
|
||||
|
||||
Reference in New Issue
Block a user