Skip to content

Saving or deleting a finding on the first page pushes a duplicate browser history entry #3666

Open

Description

Description

On the operation detail page, saving or deleting a finding always calls navigatePage(0), which writes an empty search string into the URL. When the page is already the first page (no offset parameter), the URL is identical, and react-router still pushes a new history entry for it.

Steps to reproduce

  1. Open an operation with at least one finding while on the first findings page.
  2. Save a new finding or delete an existing one.
  3. Press browser Back.

Expected behavior

Back returns to the previous page. Creating or deleting a finding on the first page should not touch the history stack, since the URL does not change.

Actual behavior

Back re-renders the same operation page with the same data, because the save pushed a duplicate entry for an identical URL. Repeated saves stack one dead entry each, so leaving the page takes as many Back presses as there were saves.

The navigation should be skipped when the offset is already the one being requested; the refresh itself is driven by the existing revision bump.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions