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

iOS+Monaca+iframeで、フォーム入力時にページの頭に飛んでしまう問題の対処

Last updated at Posted at 2018-04-26

概要

Monacaで開発したアプリをiPhoneで動かした際、iframeに埋め込んだフォームを入力しようとすると、
入力項目をフォーカスした瞬間に、ページの頭に飛ばされ続けました。
その対処法を記録しておきたいと思います。

環境

Cordovaバージョン 7.1.0
Onsen UI 2
iPhone 8

対処法

以下をiframeで埋め込まれる側のcssに記載しました。これでページトップに飛ばされなくなりました。

html, body{
  overflow: auto !important;
  height: 100% !important;
  -webkit-overflow-scrolling: touch !important;
}
4
0
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
4
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?