fix #895: generator positioning in list view

This commit is contained in:
antelle 2020-03-15 15:19:50 +01:00
parent 2c0624d5b4
commit 85e9a4c4c6
2 changed files with 10 additions and 1 deletions

View File

@ -105,8 +105,16 @@ class FieldViewText extends FieldView {
} else {
const fieldRect = this.input[0].getBoundingClientRect();
const shadowSpread = parseInt(this.input.css('--focus-shadow-spread')) || 0;
const pos = { left: fieldRect.left };
const top = fieldRect.bottom + shadowSpread;
const windowHeight = document.documentElement.clientHeight;
if (top > windowHeight / 2 && top > 200) {
pos.bottom = windowHeight - fieldRect.top + shadowSpread;
} else {
pos.top = top;
}
this.gen = new GeneratorView({
pos: { left: fieldRect.left, top: fieldRect.bottom + shadowSpread },
pos,
password: this.value
});
this.gen.render();

View File

@ -19,6 +19,7 @@ Release notes
`-` fix #1293: copying full urls
`-` fix #1378: screen orientation issues on Android PWA
`-` fix #1338: minimized option not working on linux
`-` fix #895: generator positioning in list view
##### v1.12.3 (2019-11-06)
`-` fix #1335: removed the menubar on Windows and Linux