[Webkit-unassigned] [Bug 181364] New: Caret offset when placing an iframe in a fixed position div on iOS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 6 07:18:31 PST 2018


            Bug ID: 181364
           Summary: Caret offset when placing an iframe in a fixed
                    position div on iOS
           Product: WebKit
           Version: Safari 11
          Hardware: iPhone / iPad
                OS: iOS 11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: nicecherub at gmail.com

Created attachment 330639

  --> https://bugs.webkit.org/attachment.cgi?id=330639&action=review

Error Page

I tried to create a fixed position div and place a read-write iframe on it. It works fine on desktop browsers. However, when it comes to iOS browsers, such as Safari and Google Chrome, both browsers show offset caret position after scrolling the page down. The caret is not stick to the input position. Example Code as below. How can I avoid the caret offset while keep using position:fixed div as a container?

<div id="container" style="position: fixed; top: 100px; left: 100px; z-index: 1000;">
        <iframe id="ifr" style="background: #FFF;"></iframe>
var html_string= '<html><head></head><body style="-webkit-user-modify: read-write;"></body></html>';
document.getElementById('ifr').src = "data:text/html;charset=utf-8," + escape(html_string);
<p style="line-height: 1500px;"></p>

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180106/bcfae335/attachment-0001.html>

More information about the webkit-unassigned mailing list