This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 08dd8cd428b [fix] fix link error (#3399)
08dd8cd428b is described below

commit 08dd8cd428bb98daab97b73727a86583aae64168
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Fri Feb 13 23:14:11 2026 +0800

    [fix] fix link error (#3399)
---
 src/theme/DocSidebarItem/Category/index.tsx | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/theme/DocSidebarItem/Category/index.tsx 
b/src/theme/DocSidebarItem/Category/index.tsx
index f1ca007dc00..33390a4dd32 100644
--- a/src/theme/DocSidebarItem/Category/index.tsx
+++ b/src/theme/DocSidebarItem/Category/index.tsx
@@ -177,8 +177,20 @@ export default function DocSidebarItemCategory({
                                 collapsible
                                     ? e => {
                                           onItemClick?.(item);
-                                          e.preventDefault();
-                                          updateCollapsed();
+                                          if (href) {
+                                              if (isCurrentPage) {
+                                                  // When already on this doc, 
toggle expand/collapse on text click
+                                                  e.preventDefault();
+                                                  updateCollapsed();
+                                              } else {
+                                                  // When navigating to this 
doc, just ensure it's expanded
+                                                  updateCollapsed(false);
+                                              }
+                                          } else {
+                                              // No href: behave like a pure 
toggle button
+                                              e.preventDefault();
+                                              updateCollapsed();
+                                          }
                                       }
                                     : () => {
                                           onItemClick?.(item);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to