Pnp-modern-search: Search results web part pushState changes breaks client-side navigation

Created on 11 Mar 2021  路  3Comments  路  Source: microsoft-search/pnp-modern-search

Version used
Ex: 3.17.0, 3.18.0, 4.x (earlier versions may also be affected, but haven't gone back to check)

Describe the bug
There seems to be a scenario where client-side navigation is broken and it's related to the modification of history.pushState. Basically, when the PnP search results web part is on a page and you navigate using local site navigation, it stops working and the pushState is corrupted somehow.

To Reproduce
Steps to reproduce the behavior:

  1. Create an fresh communications site
  2. Drop the PnP search results web part on the page
  3. Navigate to "Pages" using the local site navigation
  4. Use local site navigation to navigate back to "Home"
  5. Notice the navigation does not work at this point and there's a console error related to pushState.

Screenshots

Use the "Pages" link in the local site navigation

image

Once on the Pages library (same issue happens with Documents), click on any other local site navigation link and navigation is broken with the following error in the console.

image

Desktop (please complete the following information):

  • Windows 10, Chrome (latest)
Triage bug v3 v4

Most helpful comment

Fixed for upcoming v4 and release v3.18.1 with a fix.

All 3 comments

We are seeing exactly the same issue with the latest V3 and V4 webparts. v3.14.2 is the last version working well.

I cannot repro with the steps provided for dev branch of v4. v3 I do have repro.

Fixed for upcoming v4 and release v3.18.1 with a fix.

Was this page helpful?
0 / 5 - 0 ratings