Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window.open does not accept size values with "px" at the end #26077

Closed
3 tasks done
t57ser opened this issue Oct 21, 2020 · 3 comments · Fixed by #26104
Closed
3 tasks done

window.open does not accept size values with "px" at the end #26077

t57ser opened this issue Oct 21, 2020 · 3 comments · Fixed by #26104

Comments

@t57ser
Copy link
Contributor

t57ser commented Oct 21, 2020

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 10.1.4
  • Operating System:
    • Windows
  • Last Known Working Electron version:
    • 9.3.2

Expected Behavior

The window should open with the correct size

Actual Behavior

The size is ignored

To Reproduce

Use nativeWindowOpen and do: window.open("", "", "width=300px")

Additional Information

This is working in chrome and firefox and was working in electron 9. If the event is intercepted via webContents.on("new-window") then the value is shown as NAN,

@nornagon
Copy link
Member

Looks like this was caused by #23130, and should be fixed by using parseInt() instead of Number() here:

return Number(value);

@Code-Blooded-Human
Copy link
Contributor

Hello, I would like to solve this issue.

@codebytere
Copy link
Member

@Code-Blooded-Human in the future, please note when someone is assigned to an issue that means it's already being worked on - this causes collided work.

@mlaurencin mlaurencin removed their assignment Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants