LoginSignup
5
4

More than 3 years have passed since last update.

【lightbox2】IE11 でポップアップを開くとページ上部が表示される問題【jQurey】

Last updated at Posted at 2019-08-23

最新バージョンの litebox 2.11.1 を利用してライトボックスを実装しました。

IE11 だけポップアップを開くと、画像の位置ではなくページ上部が表示されるバグ?があります。

バージョンを 2.10.0 に落としたところ、IE11 でも正常に動きました。

試してはいませんが、2.11.0 でも正常に動作するかもしれません。

製作者が IE11 には対応しない方針なのか、それともバグなのかわかりません。

バグの可能性があるなら、お強い方は Issue をどうぞです。


追記

Issues を見ると指摘あるので、そのうち修正版がでるかもしれません。


追記

2.10.0 の lightbox.csshtml.lb-disable-scrolling には position: fixed; が指定されています。

litebox.css(デフォルト)
html.lb-disable-scrolling {
  overflow: hidden;
  /* Position fixed required for iOS. Just putting overflow: hidden; on the body is not enough. */
  position: fixed;
  height: 100vh;
  width: 100vw;
}

下記のように、staticにするとページ上部が表示される問題が解消されるかもしれません。

litebox.css(static
html.lb-disable-scrolling {
    overflow: hidden;
    position: static;
    height: 100vh;
    width: 100vw;
}
5
4
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
5
4