Skip to content

Commit 5443d0c

Browse files
committed
Merge branch 'dev' into jupyter
2 parents 07721d2 + 8894c45 commit 5443d0c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1212

1313
## Fixed
1414

15+
- [#2555](https://github.com/plotly/dash/pull/2555) Fix browser back button when removing one of multiple location components from layout, fix [#1312](https://github.com/plotly/dash/issues/1312)
1516
- [#2565](https://github.com/plotly/dash/pull/2565) Fix sorting for > 10 pages, fix [#2564](https://github.com/plotly/dash/issues/2564)
1617

1718
## [2.10.2] - 2023-05-31

components/dash-core-components/src/components/Location.react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export default class Location extends Component {
112112
}
113113

114114
componentDidMount() {
115-
window.onpopstate = this.onLocationChange;
115+
window.addEventListener('popstate', this.onLocationChange);
116116

117117
window.addEventListener(
118118
'_dashprivate_pushstate',
@@ -122,7 +122,7 @@ export default class Location extends Component {
122122
}
123123

124124
componentWillUnmount() {
125-
window.onpopstate = () => {};
125+
window.removeEventListener('popstate', this.onLocationChange);
126126
window.removeEventListener(
127127
'_dashprivate_pushstate',
128128
this.onLocationChange

0 commit comments

Comments
 (0)