Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/router/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default Blits.Component('Poster', {
})
```

Whenever you navigate to a new page, the URL hash will automatically be updated. Unless specified otherwise, navigating to a new page, will add that route to the history stack. The `back` input action is automatically wired up to navigate back down the history stack.
Whenever you navigate to a new page, the URL hash will automatically be updated. Unless specified otherwise, navigating to a new page, will add that route to the history stack. The `back` input action is automatically wired up to navigate back down the history stack. (If you want to disable this automatic navigation, you can pass `navigateHistory="false"` as a prop to the RouterView.)

By default, every time you navigate to a new route, the application focus will be automatically passed to the newly loaded page. If you instead want to maintain the current focus (for example in a widget that sits above your RouterView), you can use `passFocus: false` as part of the router options.

Expand Down
4 changes: 2 additions & 2 deletions src/components/RouterView.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ export default () =>
}
},
},
props: [{ key: 'navigateHistory', default: true }],
input: {
back(e) {
const navigating = Router.back.call(this)
if (navigating === false) {
if (!this.navigateHistory || !Router.back.call(this)) {
this.parent.$focus(e)
}
},
Expand Down