{"record":{"id":"7f4919e846476725","repo":"zed-industries/zed","slug":"failed-to-create-input-element-e","errorCode":null,"errorMessage":"Failed to create input element: {e:?}","messagePattern":"Failed to create input element: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_web/src/window.rs","lineNumber":150,"sourceCode":"                anyhow::anyhow!(\"Failed to set canvas {property} style: {error:?}\")\n            })?;\n        }\n\n        let body = document\n            .body()\n            .ok_or_else(|| anyhow::anyhow!(\"No `body` found on document\"))?;\n        body.append_child(&canvas)\n            .map_err(|error| anyhow::anyhow!(\"Failed to append canvas to body: {error:?}\"))?;\n        Ok(canvas)\n    }\n\n    #[allow(clippy::too_many_arguments)]\n    pub(crate) fn new(\n        _handle: AnyWindowHandle,\n        _params: WindowParams,\n        context: &WgpuContext,\n        canvas: web_sys::HtmlCanvasElement,\n        surface: wgpu::Surface<'static>,\n        browser_window: web_sys::Window,\n        lifecycle: Rc<Cell<WebWindowLifecycle>>,\n        active_window: Rc<RefCell<Option<AnyWindowHandle>>>,\n    ) -> anyhow::Result<Self> {\n        let document = browser_window\n            .document()\n            .ok_or_else(|| anyhow::anyhow!(\"No `document` found on window\"))?;\n        let body = document\n            .body()\n            .ok_or_else(|| anyhow::anyhow!(\"No `body` found on document\"))?;\n        let dpr = browser_window.device_pixel_ratio() as f32;\n        let max_texture_dimension = context.device.limits().max_texture_dimension_2d;\n        let has_device_pixel_support = check_device_pixel_support();\n        let renderer_config = WgpuSurfaceConfig {\n            size: Size {\n                width: DevicePixels(0),\n                height: DevicePixels(0),\n            },","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/gpui_web/src/window.rs#L132-L168","documentation":"In gpui_web window construction: creating the hidden DOM input element used for text input failed (document.createElement errored). This is a browser DOM failure during window initialization — the web text-input bridge cannot be set up.","triggerScenarios":"Thrown at crates/gpui_web/src/window.rs:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the DOM environment allows dynamic element creation (CSP, sandbox flags)","Create the input element once and reuse it across window rebuilds","Surface the JS error detail when text-input setup fails so the page environment issue is diagnosable"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}