Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScopedHistory block does not work for back button #132597

Closed
flash1293 opened this issue May 20, 2022 · 4 comments
Closed

ScopedHistory block does not work for back button #132597

flash1293 opened this issue May 20, 2022 · 4 comments
Labels
bug Fixes for quality problems that affect the customer experience loe:needs-research This issue requires some research before it can be worked on or estimated NeededFor:VisEditors Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@flash1293
Copy link
Contributor

Trying to block a navigation via calling scopedHistory.block does not work for back button navigation in the browser (the callback is called, but the navigation happens anyway and the URL changes).

To reproduce:

  • Add
        window.daHistory = params.history;

here:

  • Go to Lens app (Visualize Library > New visualization > Lens)

  • In browser console, execute

  daHistory.block('dont leave')
  • Click back button

  • Confirm modal is shown, but the URL changes back to /app/visualize

@flash1293 flash1293 added bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels May 20, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@lukeelmers
Copy link
Member

This is blocking the VisEditors team in moving away from the deprecated onAppLeave, which is targeted for removal by 8.8.

@lukeelmers
Copy link
Member

Discussed and decided it doesn't make sense to move forward with this issue unless we decide to set aside time for #132600.

@lukeelmers lukeelmers added the loe:needs-research This issue requires some research before it can be worked on or estimated label Jun 28, 2022
@rayafratkina
Copy link
Contributor

Closing this issue for now. #132600 will remain to track the version upgrade of history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience loe:needs-research This issue requires some research before it can be worked on or estimated NeededFor:VisEditors Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

4 participants