修复 OpenClaw 控制 UI 技能模态框在点击技能行时无响应,DevTools 显示 showModal InvalidStateError,因为对话框未打开
Use this skill when the OpenClaw dashboard Skills page becomes non-responsive and clicking a skill row fails to open the detail modal.
DevTools shows:
text
InvalidStateError: Failed to execute 'showModal' on 'HTMLDialogElement': The element is not in a Document.
Open the live bundle: sh
nano /opt/homebrew/lib/node_modules/openclaw/dist/control-ui/assets/skills-m2TVOQPH.js
Search for: text
showModal()
Replace: js
${r(e=>{!(e instanceof HTMLDialogElement)||e.open||e.showModal()})}
with: js
${r(e=>{if(!(e instanceof HTMLDialogElement)||e.open)return;let t=()=>{if(e.open)return;try{e.showModal()}catch{setTimeout(()=>{try{e.showModal()}catch{}},0)}};e.isConnected?t():setTimeout(t,0)})}
Save the file and exit.
Hard reload the dashboard:
Cmd+Shift+RClick a skill row and confirm the modal opens.
skills-*.js bundle referenced by DevTools.