Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #23 from brave/fix/issue-12
Browse files Browse the repository at this point in the history
Detect tab switch by key change, not location change
  • Loading branch information
bridiver committed Dec 9, 2015
2 parents 3bdc798 + 97db855 commit f30afd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/components/urlBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ class UrlBar extends ImmutableComponent {

componentWillReceiveProps (newProps) {
let location = newProps.activeFrameProps.get('location')
if (location !== this.props.activeFrameProps.get('location')) {
let key = newProps.activeFrameProps.get('key')
// Update the URL bar when switching tabs
if (key !== this.props.activeFrameProps.get('key')) {
AppActions.setLocation(location)
}
}
Expand Down

0 comments on commit f30afd3

Please sign in to comment.