fix: Clash between history and table of content shortcuts
related #2733
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user