Bug 172854

Summary: Window.scrollTo is not working in iframe on mobile safari.
Product: WebKit Reporter: m.samsel
Component: FramesAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 10   
Hardware: iPhone / iPad   
OS: iOS 10   

Description m.samsel 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
Comment 1 Radar WebKit Bug Importer 2017-06-03 21:51:17 PDT
<rdar://problem/32556062>
Comment 2 Simon Fraser (smfr) 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?
Comment 3 m.samsel 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.