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

Fix browser back-button use for clickable-plots #29

Open
Donnyvdm opened this issue Nov 22, 2018 · 3 comments
Open

Fix browser back-button use for clickable-plots #29

Donnyvdm opened this issue Nov 22, 2018 · 3 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@Donnyvdm
Copy link
Collaborator

Currently if a user clicks on a dot in any of the clickable plots, the app navigates to the matrix page. However, if the user then uses the back-button in the browser, the app redirects the user to the matrix page again.

The bug seems to be caused by the 'ClickData' value not being cleared upon page navigation and the redirect callback gets triggered every time the plot loads.
Possible solutions:

  • Remember the previous state of the clickdata and only navigate if the new click is different from the previous one. This will introduce a bug by preventing navigation if a user clicks a dot -> hits the back button -> clicks the same dot again.
  • Clear the ClickData value upon page navigation. If ClickData can be used as an Output in a callback, it could use the dcc.Location as input and be cleared every time the url changes.
  • Check the Dash community forums if anyone has had the same problem
@Donnyvdm Donnyvdm added the bug Something isn't working label Nov 22, 2018
@Donnyvdm Donnyvdm added this to Backlog in gdscmatrixexplorer via automation Nov 22, 2018
@Donnyvdm Donnyvdm moved this from Backlog to To do in gdscmatrixexplorer Jan 31, 2019
@Donnyvdm Donnyvdm added the help wanted Extra attention is needed label Feb 6, 2019
@Donnyvdm
Copy link
Collaborator Author

Donnyvdm commented Feb 6, 2019

@howard-lightfoot @wendyyang I cannot reproduce this bug, could you try to see if it's fixed for you too? Maybe fixed with the dash update?

@Donnyvdm Donnyvdm added wontfix This will not be worked on and removed help wanted Extra attention is needed labels Feb 15, 2019
@Donnyvdm
Copy link
Collaborator Author

The bug occurs only in firefox with the following sequence:

  1. visit page with clickable plot
  2. click one of the data points
  3. hit the browser back-button
  4. hover over the plot again

@Donnyvdm
Copy link
Collaborator Author

The source seems to be deep inside the dash framework and dcc.Location element (and how it interacts with the browser), so it is currently not worth the effort of fixing it.

@Donnyvdm Donnyvdm moved this from To do to Backlog in gdscmatrixexplorer Feb 15, 2019
@Donnyvdm Donnyvdm removed this from Backlog in gdscmatrixexplorer Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant