Bug 1902254 - Increase SelectTranslationsPanel resize buffer r=ohall,translations-reviewers

Increases the buffer kept between the bottom edge of the
panel and the bottom of the screen or window to be relative
to 1/5 of the panel's starting height upon open, rather than
an arbitrarily set 20 pixels.

Differential Revision: https://phabricator.services.mozilla.com/D213589
This commit is contained in:
Erik Nordin
2024-06-13 19:03:00 +00:00
parent c768d31869
commit 728ddbe4a2

View File

@@ -997,7 +997,7 @@ var SelectTranslationsPanel = new (class {
// We want to maintain some buffer of pixels between the panel's bottom edge
// and the bottom edge of our available space, because if they touch, it can
// cause visual glitching to occur.
const BOTTOM_EDGE_PIXEL_BUFFER = 20;
const BOTTOM_EDGE_PIXEL_BUFFER = Math.abs(panelBottom - panelTop) / 5;
if (panelBottomToBottomEdge < BOTTOM_EDGE_PIXEL_BUFFER) {
this.console?.debug(