-1

I have a posting form in my web app. On Android phone, When the contenteditable div is focused the soft keyboard pushes every other html elements up so it is good. However, on iPhone it does not do the same, but the keyboard just covers every other elements that are positioned in the bottom half of the screen. I built the page with vue.js and the code is as below:

<!DOCTYPE html>
 <html>
  <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width,initial-scale=1.0, user-scalable=no">
     <base href="/">
     <title>iyf</title>
     <style>html { scroll-behavior: smooth }</style>
  </head>
  <body>
  <main class="posting">
    <div class="creatingPost">
      <div class="nav">
        <button class="cancel">cancel</button>
        <p class="title">create</p>
        <button class="confirm">done</button>
      </div>
      <div class="contents">
        <div class="text" contenteditable="true"></div>
      </div>
      <div class="wrapper">
        <div class="previews">
          <div class="photos">
          </div>
          <div class="location">
          </div>
        </div>
        <div class="nav">
          <div class="inclusions">
            <input type="file"/>
            <div class="upload-icon-photo" ></div>
            <div class="upload-icon-video"></div>
            <div class="upload-icon-location"></div>
          </div>
        </div>
      </div>
    </div>
  </main>
 </body>
</html>
Jay Jeong
  • 892
  • 2
  • 11
  • 24

2 Answers2

0

I also encounter this issue on iphoneX (XR) Chrome, and may webpage work fine in iphone7,8.

Both ios-Chrome are up-to-date version of Chrome.

It is troublesome!

Also looking for solution.

Tim
  • 11
  • 5
0

You can observe this on any site using Chrome iOS (including www.google.com), a recent version of Chrome iOS introduced this bug where the keyboard won't push up the page content.

There is also a chromium bug open here: https://bugs.chromium.org/p/chromium/issues/detail?id=916806

alex
  • 71
  • 4