fix: Toggle shortcut for TOC not working

This commit is contained in:
Tom Moor
2024-01-23 09:00:09 -05:00
parent aadd916336
commit db2a66cb8a
2 changed files with 9 additions and 22 deletions

View File

@@ -264,20 +264,6 @@ class DocumentScene extends React.Component<Props> {
}
};
onToggleTableOfContents = (ev: KeyboardEvent) => {
if (!this.props.readOnly) {
return;
}
ev.preventDefault();
const { ui } = this.props;
if (ui.tocVisible) {
ui.hideTableOfContents();
} else {
ui.showTableOfContents();
}
};
onSave = async (
options: {
done?: boolean;
@@ -433,14 +419,6 @@ class DocumentScene extends React.Component<Props> {
}
}}
/>
<RegisterKeyDown
trigger="h"
handler={(event) => {
if (event.ctrlKey && event.altKey) {
this.onToggleTableOfContents(event);
}
}}
/>
<Background
id="full-width-container"
key={revision ? revision.id : document.id}