LoginSignup
7
2

More than 3 years have passed since last update.

Chrome for Macでwindow.open()したのに新規ウィンドウが開かない!ってなった

Last updated at Posted at 2020-02-21

ブラウザの新規タブや新規ウィンドウを開く際はwindow.open()を使用しますよね。1
新規ウィンドウで開かず苦戦したので愚t共有します。2

window.open() おさらい

新規ウィンドウを開くためには以下のように指定します。

window.open('http://example.com/', '_blank', 'width=500, height=500')

結論

ブラウザの全画面表示時と通常時で挙動に違いがある。
びっくりですよね。ずっと全画面でやっていたのでハマりました。
教えてくれた人ありがとう。。。

全画面表示時

タブで開かれる。

通常時

新規ウィンドウで開かれる。


  1. https://developer.mozilla.org/ja/docs/Web/API/Window/open 

  2. バージョン: 80.0.3987.116(Official Build) (64 ビット) 

7
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
2