mathiasbynens / mathiasbynens/document.scrollingElement

scrollTop keeps being 0 within iframe on Safari iOS 12.2 (iPad)

Open
#24 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
131
Forks
14
PR merge metrics
No merged PRs in 30d

Description

I'm running a little local example with localhost HTTPS server to test this specific iPad issue, thought this polyfill would help me but even when using this scrollingElement, it keeps returning 0 when doing `document.scrollingElement.scrollTop`.

It ONLY happens if the scrolling is being done within iframe.

Any ideas?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report with the local HTTPS example on an iPad running Safari iOS 12.2, with scrolling inside an iframe. Inspect document.scrollingElement.scrollTop during that scrolling and trace the polyfill behavior. Done means the scrolling element reports the expected position in this iframe scenario, with a regression test if the repository has an appropriate test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.