Scroll position resetting on overy page change

Open
#6,670 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

The report links the scroll reset to change #6662 and reproduces it when returning from a poll detail view in the browser. Read that change and trace the poll list and detail navigation to find where scroll state is lost. Reproduce the steps in the issue; done means browser back restores the previous scroll position.

Written by the indexing model from the issue text.

Description

bug

Describe the bug
As of #6662 the scroll position is resetting on every page change. This can be rather annoying.
Reproduction is just an example. This happens everywhere.

How to Reproduce

  1. Create election
  2. Create multiple polls such that the page scrolls
  3. Scroll to bottom and open poll detail view
  4. Go back via back button of browser
  5. Scroll position is reset to top

Expected behavior
Scroll position should be at the position where it was before navigating to poll detail.

Additional context
Introduced in #6662 as an attempt to fix #6661

Dominant language
TypeScript
Stars
35
Forks
53
Avg merge
1d 6h
Merged PRs (30d)
49

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

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.

More from OpenSlides/openslides-client

All issues in OpenSlides/openslides-client

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.