fix: approval windows open as wide as the page (closes #518)
The approval window was opened 360 pixels wide while the page is 396, so it scrolled sideways and cut off the Reject button. It now opens at 396. The browser counts the window's frame in that width, and a tall screen gives some of it to a vertical scrollbar, so once the approval's screen is up the page widens its own window by however far it would scroll sideways, times the page's zoom. The toolbar popup's window is left alone. The Firefox suite checks that the sign prompt does not scroll sideways; the Chrome suite cannot, as its approval windows open at 1280x720 whatever size is asked. README's Visual Style line now gives the page's real width. Model: opus-5-5
This commit is contained in:
@@ -2854,7 +2854,7 @@ describe("where an approval window opens", () => {
|
||||
await settle();
|
||||
|
||||
expect(bg.created).toHaveLength(1);
|
||||
expect(bg.created[0]).toMatchObject({ left: 460, top: 60 });
|
||||
expect(bg.created[0]).toMatchObject({ left: 442, top: 60 });
|
||||
});
|
||||
|
||||
test("not centred on an approval window the user was last in", async () => {
|
||||
@@ -2871,7 +2871,7 @@ describe("where an approval window opens", () => {
|
||||
bg.requestSign();
|
||||
await settle();
|
||||
|
||||
// Centred, it would be at left 900, the position the browser refused.
|
||||
// Centred, it would be at left 882, the position the browser refused.
|
||||
expect(bg.created).toHaveLength(1);
|
||||
expect(bg.created[0].left).toBeUndefined();
|
||||
expect(bg.created[0].top).toBeUndefined();
|
||||
@@ -2893,7 +2893,7 @@ describe("where an approval window opens", () => {
|
||||
await settle();
|
||||
|
||||
expect(bg.created).toHaveLength(2);
|
||||
expect(bg.created[0]).toMatchObject({ left: 1520, top: 750 });
|
||||
expect(bg.created[0]).toMatchObject({ left: 1502, top: 750 });
|
||||
expect(bg.created[1].left).toBeUndefined();
|
||||
expect(bg.created[1].top).toBeUndefined();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user