fix: Clash between history and table of content shortcuts

related #2733
This commit is contained in:
Tom Moor
2021-11-08 18:03:03 -08:00
parent e170a63094
commit a600a897c3
3 changed files with 7 additions and 3 deletions

View File

@@ -203,11 +203,12 @@ class DocumentScene extends React.Component<Props> {
goToHistory = (ev) => {
if (!this.props.readOnly) return;
if (ev.ctrlKey) return;
ev.preventDefault();
const { document, revision } = this.props;
const { document, location } = this.props;
if (revision) {
if (location.pathname.endsWith("history")) {
this.props.history.push(document.url);
} else {
this.props.history.push(documentHistoryUrl(document));