| Summary: | IntersectionObserver Api Ratio Less Than 1 While Toolbar Visible | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mahdi <mohammadmahdi1383> | ||||
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | ahmad.saleem792, bfulgham, simon.fraser, webkit-bug-importer, zalan | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari 16 | ||||||
| Hardware: | Mac (Intel) | ||||||
| OS: | iOS 16 | ||||||
| Attachments: |
|
||||||
Changed test to following JSFiddle: https://jsfiddle.net/58h0ko2w/ In Chrome Canary 118, I get following in JSFiddle Console: "Ratio is: ", 1 "%cWorking", "color: green;" _____ In WebKit ToT (266852@main): "Ratio is: ", 0.9980040192604065 and get console error: <a class='gotoLine' href='#"Expect ratio to be 1 but got 0.9980040192604065"'>"Expect ratio to be 1 but got 0.9980040192604065"</a> ____ In Firefox Nightly 118: Same as Firefox but different ratio but also error. |
Created attachment 462761 [details] Image of example on Safari 16 - iPhone14 - iOS 16 Problem: IntersectionObserver api in every desktop browser and mobile browsers that does not have `Toolbar` like safari on bottom of the webpage, is giving the intersectionRatio of `1` when the observed target reached the top of view: ------------------- <-- top of browser web view +++++++++++++++++++ <-- ELEMENT THAT REACHES THE TOP | Hello World | | | +++++++++++++++++++ ------------------- <-- bottom of browser web view But in Safari on iOS with Toolbar that in the browser view, it gives the value of ~0.9 for intersectionRatio which is INCORRECT!?