3
0

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 3 years have passed since last update.

iOS13.5 Safari でページがスクロールできないバグの解消

Posted at

iOS13.5バグ発生

複雑なコードの一部のため、細かい発生条件の切り分けまでできていませんが…
高さを指定したdivoverflow:auto指定をして、画面内でスクロールするコンテンツが、OSアップデートしたとたん動かなくなりました。

解決法

いろいろ試し、結果として、以下が判明しました。

  • CSSのoverflowの値を再定義してやればスクロールできるようになる。
  • ただし、2度同じ再定義をしても、以後はスクロールできるようにならない。

divの中のHTMLを動的に書き換えるコンテンツだったため、スクロールが必要だったり必要なかったりします。

コード

結果として、すごくびみょうな方法ですが…値としてautoscrollを交互に入れ替える方法で解決しました。

//表示されてから実行するために、setTimeoutで遅延。
setTimeout(function(){
	
	if($(target).css('overflow')=='auto'){
		$(target).css('overflow','scroll');
	}else{
		$(target).css('overflow','auto');
	}
},100);
3
0
1

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
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?