Skip to content

A scrollTo link to a space on page 2 of the Spaces overview freezes the tab #4268

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

A scrollTo link to a space that's on page 2 or later of the Spaces overview freezes the browser tab. Every usePagination instance subscribes to the global app.files.navigate.page event, whether or not it paginates the list that's rendered. Projects.vue has two of them: its own one (sorted and filtered spaces) and the one inside useResourcesViewDefaults (unsorted store items). Both push the page they compute and then publish app.files.navigate.scrollTo. useScrollTo publishes navigate.page again when the row isn't on the shown page, so the two keep switching pages back and forth forever. The trash overview has the same double setup, it just has nothing that publishes the event right now.

Reproduction Steps

  1. Have more than 20 project spaces
  2. Open /files/spaces/projects?items-per-page=20&scrollTo=<id of a space on page 2>

Expected Outcome

The overview switches to page 2, selects the space and scrolls to it.

Actual Outcome

The tab freezes, the main thread stops responding. A space on page 1 works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions