appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.63k stars 3.74k forks source link

[Bug]: navigateTo parameters are being persistent when switching pages #35990

Open art-jg opened 2 months ago

art-jg commented 2 months ago

Is there an existing issue for this?

Description

I have a JS function which checks if there is a parameter in URL query and optionally shows modal on page load. The problem is argument passed via navigateTo persists when switch to other pages and returning back.

Sample Framework app can be used to reproduce this issue https://app.appsmith.com/app/framework/navigateto-62566b650d3d384069c05830

Steps To Reproduce

  1. Go to page NavigateTo
  2. Update Current Page's Query Params
  3. Go to any other page
  4. Passed arguments are now appended to every page's URL

Public Sample App

https://app.appsmith.com/app/framework/navigateto-62566b650d3d384069c05830

Environment

Production

Severity

Medium (Frustrating UX)

Issue video log

No response

Version

Cloud

rohan-arthur commented 2 months ago

@art-jg thank you for reporting this! I need to validate the expected behaviour and we should indeed debug it, but meanwhile would you please describe your use-case so that I can try to find a way for you? Easiest if you build a simple app to demonstrate the problem and invite support@appsmith.com as a developer to it.

art-jg commented 2 months ago

@art-jg thank you for reporting this! I need to validate the expected behaviour and we should indeed debug it, but meanwhile would you please describe your use-case so that I can try to find a way for you? Easiest if you build a simple app to demonstrate the problem and invite support@appsmith.com as a developer to it.

  1. Issue is fully reproducible in the public sample app I've attached
  2. We have a scenario where one page redirects to another, and a modal is displayed based on the presence of specific parameters in the URL. The issue arises when a user is redirected, navigates to a different page, and then returns to the page with the modal check. In this case, the modal is always displayed, because URL parameters are not being cleared