Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

[Bug Fix] Context menu doesn't show up when switching between tabs from sidebar #172

Merged

Conversation

zhongnansu
Copy link
Member

@zhongnansu zhongnansu commented Nov 5, 2020

Issue #, if available:
context menu doesn't show up when switching between dashboards & visualizations from sidebar (i.e URL change but no hash change)

Description of changes:

When navigating to tabs from Kibana sidebar, it uses history.pushState, which doesn't trigger window.onHashchange.
Taking solution provided from the following link, to monkey patch event and add event listener. https://stackoverflow.com/questions/4570093/how-to-get-notified-about-changes-of-the-history-via-history-pushstate/4585031

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@zhongnansu zhongnansu changed the title Fix content menu [Bug Fix] Context menu doesn't show up when switching between tabs from sidebar Nov 5, 2020
@zhongnansu zhongnansu marked this pull request as ready for review November 5, 2020 08:26
Copy link
Contributor

@davidcui1225 davidcui1225 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM- thanks for the fix!

@zhongnansu zhongnansu merged commit 605514b into opendistro-for-elasticsearch:dev Nov 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants