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:
@@ -640,6 +640,17 @@ step(
|
||||
await d.switchToWindow(popup);
|
||||
await d.waitVisible("#view-approve-sign");
|
||||
|
||||
// The window is opened as wide as the page, and widened once the
|
||||
// screen is up if it still scrolls sideways
|
||||
// (https://git.eeqj.de/sneak/AutistMask/issues/518). This suite is
|
||||
// where that is checked: the Chrome suite's approval windows open at
|
||||
// 1280x720 whatever width the extension asks for.
|
||||
await d.waitFor(
|
||||
"the sign prompt to fit its window without scrolling sideways",
|
||||
"return document.documentElement.scrollWidth <=" +
|
||||
" document.documentElement.clientWidth;",
|
||||
);
|
||||
|
||||
const screen = await d.execute(
|
||||
`return {
|
||||
origin: document.getElementById("approve-sign-origin").textContent,
|
||||
|
||||
Reference in New Issue
Block a user