rod icon indicating copy to clipboard operation
rod copied to clipboard

Why doesn't it remember the window size now?

Open moxcomic opened this issue 2 years ago • 3 comments

Rod Version: v0.114.7

I remember that in previous versions, when using the same code, if you manually dragged the window to change its size, the size would be maintained the next time you started it. But now it seems to revert to a fixed size. Is it necessary now to use MustSetWindow to maintain the window size?

Code

rod.
  New().
  ControlURL(
      launcher.New().
      Headless(false).
      Bin("/Applications/Google Chrome.app/Contents/MacOS/Google Chrome").
      UserDataDir("./data").
      MustLaunch(),
  ).
  MustConnect().
  NoDefaultDevice().
  MustPage("")

moxcomic avatar Feb 10 '24 06:02 moxcomic

Please fix the format of your markdown:

6 MD003/heading-style/header-style Heading style [Expected: setext; Actual: atx]
6 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Code"]
7 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"]
7 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]

generated by check-issue

github-actions[bot] avatar Feb 10 '24 06:02 github-actions[bot]

I haven't changed any related logic. I think every time you launch the browser, you will open a new tab, because different tabs can have the same url, how could you know it's the same one as the last launch?

ysmood avatar Feb 18 '24 08:02 ysmood

I haven't changed any related logic. I think every time you launch the browser, you will open a new tab, because different tabs can have the same url, how could you know it's the same one as the last launch?

I remember that in previous versions of Chrome, the browser would remember the window size changed by dragging the mouse, but after a certain update of the Chrome browser, it no longer remembers the window size. It might be due to the Chrome update.

moxcomic avatar Feb 18 '24 13:02 moxcomic

I haven't changed any related logic. I think every time you launch the browser, you will open a new tab, because different tabs can have the same url, how could you know it's the same one as the last launch?

If I don't specify UserDataDir("./data"), it can remember the window size. I don't understand the reason behind this.

moxcomic avatar Feb 21 '24 16:02 moxcomic

could you try without rod? I might be a chromium issue.

ysmood avatar Feb 22 '24 05:02 ysmood

could you try without rod? I might be a chromium issue.

When I try launching with /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/path/to/data, it can remember the window size normally.

moxcomic avatar Feb 22 '24 05:02 moxcomic

How about use the Launcher.NewUserMode

ysmood avatar Feb 22 '24 08:02 ysmood

How about use the Launcher.NewUserMode

It cannot record either; only when opened using the command can it normally record the window size.

moxcomic avatar Feb 22 '24 11:02 moxcomic

The fix will be released in the next version

ysmood avatar Feb 27 '24 03:02 ysmood

Please check v0.114.8

ysmood avatar Mar 06 '24 12:03 ysmood

Please check v0.114.8

Thanks, the issue has been fixed after testing.

moxcomic avatar Mar 07 '24 01:03 moxcomic