Problem/Motivation

If I progress through the demo using the right-pointing chevron serving as the next item arrow, then intermittently the page will scroll such that the active item widget is not visible on the page.

In Firefox Mac, this happened to me multiple times and the page scrolled to the top. See attached video.
In Chrome Mac, this happened to me once and the page scrolled down toward the bottom.
In Safari Mac, I was unable to reproduce the issue.

Steps to reproduce

1. Go to simplytest.me
2. Create a site with Drupal core 11.x-dev and Editorially 3.x-dev
3. Log in as admin
4. Go to /admin/config/content/editoria11y/demo
5. Hover over the first issue icon
6. Click the right-pointing chevron
7. Repeat step six until you have gone through all the issues

Expected result: Each click delivers me to the next issue, which is visible on the current screen
Actual result: Multiple times in Firefox and once in Chrome the active issue was not visible on the current screen

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

charles belov created an issue. See original summary.

itmaybejj’s picture

Assigned: Unassigned » itmaybejj

  • itmaybejj committed 470d749d on 3.0.x-dev
    bug: #3574134 Clicking in the next item button sometimes jumps elsewhere...
itmaybejj’s picture

Status: Active » Needs review

I think I have this fixed. Or at least I found something that could definitely be the cause.

I have mutation observers that monitor the page for dynamic content. I pause these observers before writing to the page so that my writes do not trigger re-checks.

One of the six needed pause/resume pairs was missing in the 3.x branch, so a check was running in the background mid-scroll and briefly spiking the CPU. Whether that introduces visible jank depends on how quickly a browser finishes a test run, and whether it draws animation frames before the tip settles into place.

itmaybejj’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.