1
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

jQueryのライブラリ drawer.js のスクロールできない問題への対処法

Posted at

下記にリストした参考URLにあるように、2018年になってiosデバイスでjQueryのライブラリ drawer.js で実装したメニューがスクロールできないという事象をよく耳にするようになった。

その対策として drawer.css に overflow:auto; を追記した。

drawer.css
.drawer--top.drawer-open .drawer-nav {
  top: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.drawer--left.drawer-open .drawer-nav,
.drawer--left .drawer-hamburger,
.drawer--left.drawer-open .drawer-navbar .drawer-hamburger {
  left: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.drawer--right.drawer-open .drawer-nav,
.drawer--right .drawer-hamburger,
.drawer--right.drawer-open .drawer-navbar .drawer-hamburger {
  right: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

元ネタの参考URL
スマホのハンバーガーメニューでpositionにfixedを入れてスクロールできなくなる問題を解決

その他の対処法の参考
https://iritec.jp/web_service/13864/
https://teratail.com/questions/127838
https://tiltilmitil.co.jp/blog/891
https://sublimelife.hatenablog.com/entry/2018/06/21/183718

1
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
1
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?