fix: 修复导航页点击页面总览同时打开两个tab的回归问题
0603113提交重构 popover 为延迟渲染模式后,popover DOM 改由 togglePop 函数首次点击时动态构建,但 insertAdjacentHTML 模板漏加 onclick= "event.stopPropagation()",导致 popover 内 <a> 点击事件冒泡到父级 module-card 触发 window.open 打开模块入口页,与 <a> 默认跳转叠加 造成点击"页面总览"等列表项时同时打开两个 tab。与5c518cb同一根因, 修复方式一致:恢复 popover 容器上的 stopPropagation。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
a4697b0fb9
commit
f67176459a
+1
-1
@@ -994,7 +994,7 @@ function togglePop(uid, e) {
|
||||
}).join('');
|
||||
const countEl = document.querySelector('[data-pop="' + uid + '"]');
|
||||
if (countEl) {
|
||||
countEl.insertAdjacentHTML('afterend', '<div class="page-popover" id="pop-' + uid + '"><div class="page-popover__title">页面列表</div>' + popItems + '</div>');
|
||||
countEl.insertAdjacentHTML('afterend', '<div class="page-popover" id="pop-' + uid + '" onclick="event.stopPropagation()"><div class="page-popover__title">页面列表</div>' + popItems + '</div>');
|
||||
el = document.getElementById('pop-' + uid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user