Integrated: 8339684: ResizeObserver callback interrupts smooth scrolling on Chrome
Hannes Wallnöfer
hannesw at openjdk.org
Thu Oct 3 16:46:44 UTC 2024
On Tue, 10 Sep 2024 13:39:10 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
> Please review a simple JavaScript change to avoid the `ResizeObserver` callback to interrupt smooth scrolling on Chrome browsers when an page with an anchor is loaded. Unfortunately, Chrome is susceptible to interrupt smooth scrolling if a script accesses the DOM while scrolling. Since the `ResizeObserver` callback is invoked when the page is loaded, Chrome failed to scroll to the element indicated by the anchor. This change causes the initial invocation of the callback to be ignored.
>
> I have uploaded [sample docs built with this fix](https://cr.openjdk.org/~hannesw/8339684/api.00/) to be tested against the [unfixed docs](https://download.java.net/java/early_access/jdk24/docs/api/).
This pull request has now been integrated.
Changeset: de12fc7a
Author: Hannes Wallnöfer <hannesw at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/de12fc7a3601ad7d5e10ccd38967b26eadf96aff
Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
8339684: ResizeObserver callback interrupts smooth scrolling on Chrome
Reviewed-by: prappo
-------------
PR: https://git.openjdk.org/jdk/pull/20935
More information about the javadoc-dev
mailing list