{"record":{"id":"eb6b6d76cc8a5bca","repo":"GopeedLab/gopeed","slug":"element-is-not-focusable-selector","errorCode":null,"errorMessage":"element is not focusable: ${selector}","messagePattern":"element is not focusable: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"pkg/download/engine/webview/runtime.go","lineNumber":177,"sourceCode":"\tpage, err := p.page()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\texpression, err := normalizeExecutable(scriptOrFn)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn page.Execute(expression, args...)\n}\n\nfunc (p *PageHandle) Focus(selector string) error {\n\t_, err := p.Execute(`(selector) => {\n\t\tconst element = document.querySelector(selector);\n\t\tif (!element) {\n\t\t\tthrow new Error(\"element not found: \" + selector);\n\t\t}\n\t\tif (typeof element.focus !== \"function\") {\n\t\t\tthrow new Error(\"element is not focusable: \" + selector);\n\t\t}\n\t\telement.focus();\n\t\treturn true;\n\t}`, selector)\n\treturn err\n}\n\nfunc (p *PageHandle) Click(selector string, opts ...map[string]any) error {\n\tclickOpts := parseClickOptions(firstMap(opts))\n\t_, err := p.Execute(`(selector, delayMS) => {\n\t\tconst element = document.querySelector(selector);\n\t\tif (!element) {\n\t\t\tthrow new Error(\"element not found: \" + selector);\n\t\t}\n\t\tif (typeof element.scrollIntoView === \"function\") {\n\t\t\telement.scrollIntoView({ block: \"center\", inline: \"center\" });\n\t\t}\n\t\tconst performClick = () => {","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/GopeedLab/gopeed/blob/7b7327ffb30816273a74b142cccc0bc10c5a4c67/pkg/download/engine/webview/runtime.go#L159-L195","documentation":"Error \"element is not focusable: ${selector}\" thrown in GopeedLab/gopeed.","triggerScenarios":"Thrown at pkg/download/engine/webview/runtime.go:177 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b7327ffb30816273a74b142cccc0bc10c5a4c67","analyzedAt":"2026-08-16T02:51:03.250Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}