Skip to content

Inconsistent state when using browser history after expanding all sections #284

@kfranqueiro

Description

@kfranqueiro

Steps to reproduce

  1. Click Expand all sections
  2. Click any section in the Contents tab
  3. Press the back button

FWIW, judging by the old changelog, this may have been broken for nearly a decade. However, this is now additionally reproducible on the latest build by clicking any anchor link that appears within an individual section's text, which happens in e.g. 1.1.1's Sufficient Techniques.

Expected Behavior

  • You end up at the top of the page with everything still expanded

Actual Behavior

  • You end up at the top of the page but techniques and "About & How to Use" are collapsed; interestingly, full descriptions are still expanded.
  • The page is clearly out of sync:
    • There is still a large gap from where "Show About & How to Use" appeared when it was open
      • This issue can also be reproduced with specifically only this section, if you replace step 1 above with clicking "Show About & How to Use"
    • The button to expand/collapse all sections still says "collapse", not "expand"; you must click it twice to get to the state you were in before

Cause

I notice that if you expand individual techniques sections one-by-one, it seems to register in the query string, whereas the expand all toggle does not. I suspect something that happens in/from applyurl is not taking the "all" toggle into account, and wonder if that toggle should also somehow be represented in the URL.

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