citation dlg: persist screen position (#5122)

Do not explicitly move the window to the center of the screen.

Fixes: #5119
This commit is contained in:
abaevbog 2025-03-14 20:04:31 -07:00 • committed by GitHub
parent 4915f1fadf
commit 99b4171500
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,13 +74,6 @@ async function onLoad() {
// keypress from the top-most row in the items table
doc.addEventListener("keydown", event => KeyboardHandler.captureKeydown(event), true);
// Move dialog towards the center (it's needed even though we open the dialog with centerscreen param)
let targetX = Math.floor((window.screen.width - window.outerWidth) / 2);
let targetY = window.screen.height / 3;
setTimeout(() => {
window.moveTo(targetX, targetY);
});
// citation has to be built before libraryLayout.init to so itemTree knows which items to highlight
await CitationDataManager.buildCitation();
IOManager.updateBubbleInput();