Skip to content

Commit 7881d7a

Browse files
committed
Edit window gets restored smaller on Windows
1 parent 77bc7dc commit 7881d7a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

content/edit.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ const CSSHTMLNS = "@namespace url(http://www.w3.org/1999/xhtml);";
2222
// Only do this if we're opened with openDialog, in which case window.opener is set
2323
if (window.opener) {
2424
var windowPersist = JSON.parse(prefs.getCharPref("editorWindowPersist"));
25-
var de = document.documentElement;
26-
de.width = windowPersist.width;
27-
de.height = windowPersist.height;
2825
window.moveTo(windowPersist.screenX, windowPersist.screenY);
26+
window.resizeTo(windowPersist.width, windowPersist.height);
2927
if (windowPersist.windowState == 1) {
3028
//https://bugzilla.mozilla.org/show_bug.cgi?id=1079962
3129
window.addEventListener("load", function() {
@@ -45,8 +43,8 @@ if (window.opener) {
4543
// this can fail if this is in a tab. if so, don't save.
4644
try {
4745
windowPersist = {
48-
width: document.width,
49-
height: document.height,
46+
width: window.outerWidth,
47+
height: window.outerHeight,
5048
screenX: window.screenX,
5149
screenY: window.screenY
5250
}

0 commit comments

Comments
 (0)