(parentIndex, browserStepId)
| 1079 | } |
| 1080 | |
| 1081 | function scrollToBrowserStep(parentIndex, browserStepId) { |
| 1082 | const browserStepElement = document.getElementById(`browser-step-${parentIndex}-${browserStepId}`); |
| 1083 | if (browserStepElement) { |
| 1084 | browserStepElement.scrollIntoView({ |
| 1085 | behavior: 'smooth', |
| 1086 | block: 'start' |
| 1087 | }); |
| 1088 | |
| 1089 | // 更新活跃的导航项 |
| 1090 | updateActiveNavItem(parentIndex, browserStepId); |
| 1091 | |
| 1092 | // 确保父步骤是展开的 |
| 1093 | const stepContent = document.getElementById(`step-content-${parentIndex}`); |
| 1094 | if (stepContent && !stepContent.classList.contains('show')) { |
| 1095 | const collapseInstance = new bootstrap.Collapse(stepContent, { |
| 1096 | toggle: false |
| 1097 | }); |
| 1098 | collapseInstance.show(); |
| 1099 | } |
| 1100 | } |
| 1101 | } |
| 1102 | |
| 1103 | function toggleBrowserNav(stepIndex, event) { |
| 1104 | event.stopPropagation(); // 阻止事件冒泡 |
nothing calls this directly
no test coverage detected