mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 15:22:26 +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 autoSize()
|
||||||
{
|
{
|
||||||
function getHeight()
|
minHeight = Math.max(minHeight, completionBody.getBoundingClientRect().bottom);
|
||||||
{
|
container.height = minHeight;
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
doc.body.addEventListener("DOMSubtreeModified", autoSize, true);
|
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; }
|
*:-moz-loading, *:-moz-broken { display: none !important; }
|
||||||
|
|
||||||
|
.completion-items {
|
||||||
|
width: 100%;
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
.compitem {
|
.compitem {
|
||||||
display: table-row;
|
display: table-row;
|
||||||
}
|
}
|
||||||
@@ -81,7 +85,7 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding: 0 .5ex;
|
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[selected=true] { background-color: yellow; }
|
||||||
.compitem > .favicon { width: 16px; }
|
.compitem > .favicon { width: 16px; }
|
||||||
|
|||||||
Reference in New Issue
Block a user