NEW 172854
Window.scrollTo is not working in iframe on mobile safari.
https://bugs.webkit.org/show_bug.cgi?id=172854
Summary Window.scrollTo is not working in iframe on mobile safari.
m.samsel
Reported 2017-06-02 05:25:17 PDT
Summary: Executing method Window.scrollTo(x, y) in mobile safari do not scroll content to proper position. Desktop version work properly. Steps to Reproduce: 1. Create web page. 2. Insert iframe on this page. 3. iframe need to contain some JS which will call scrollTo() function. 4. Run this method. 5. Scrolling is not happen. Expected Results: Iframe will scroll to proper position. Observed Results: Iframe do not scroll to proper position. Version: Safari Mobile 10.3.2 (14F89) newest version from AppStore (valid on 2017-06-02) tested on iPad and iPhone SE. Notes: Example code used to test: https://jsfiddle.net/dxket17g/2/ https://gist.github.com/msamsel/c2db20163786594f7c4c3307c23f3d92
Attachments
Radar WebKit Bug Importer
Comment 1 2017-06-03 21:51:17 PDT
Simon Fraser (smfr)
Comment 2 2017-06-04 07:53:49 PDT
iframes on iOS are expanded to the size of their contents, so what do you expect window.scrollTO to do?
m.samsel
Comment 3 2017-06-05 00:50:21 PDT
(In reply to Simon Fraser (smfr) from comment #2) > iframes on iOS are expanded to the size of their contents, so what do you > expect window.scrollTO to do? Is this behaviour of iframe on iOS described somewhere? Also in my case: where iframe has width and height 300px and body of iframed html has style to be 2000px width and height, it's not scaled (or it can be only expanded but not scale down?) I expected to have coherent behaviour between iOS and MacOS Safari. If it's not possible, then I appreciate to get some reference to documentation describing this feature, I wasn't able to find official description of this case.
Note You need to log in before you can comment on or make changes to this bug.