Bug 172854 - Window.scrollTo is not working in iframe on mobile safari.
Summary: Window.scrollTo is not working in iframe on mobile safari.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: Safari 10
Hardware: iPhone / iPad iOS 10
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-06-02 05:25 PDT by m.samsel
Modified: 2017-06-05 00:50 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.