Browse Source

:bug: https://github.com/siyuan-note/siyuan/issues/5525

Vanessa 2 năm trước cách đây
mục cha
commit
0bccdb6f29
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      app/src/util/backForward.ts

+ 6 - 0
app/src/util/backForward.ts

@@ -187,6 +187,9 @@ const focusStack = async (stack: IBackStack) => {
 };
 };
 
 
 export const goBack = async () => {
 export const goBack = async () => {
+    if (document.querySelector("#barBack").classList.contains("toolbar__item--disabled")) {
+        return;
+    }
     if (window.siyuan.backStack.length === 0) {
     if (window.siyuan.backStack.length === 0) {
         if (forwardStack.length > 0) {
         if (forwardStack.length > 0) {
             await focusStack(forwardStack[forwardStack.length - 1]);
             await focusStack(forwardStack[forwardStack.length - 1]);
@@ -216,6 +219,9 @@ export const goBack = async () => {
 };
 };
 
 
 export const goForward = async () => {
 export const goForward = async () => {
+    if (document.querySelector("#barForward").classList.contains("toolbar__item--disabled")) {
+        return;
+    }
     if (forwardStack.length === 0) {
     if (forwardStack.length === 0) {
         if (window.siyuan.backStack.length > 0) {
         if (window.siyuan.backStack.length > 0) {
             await focusStack(window.siyuan.backStack[window.siyuan.backStack.length - 1]);
             await focusStack(window.siyuan.backStack[window.siyuan.backStack.length - 1]);