{"record":{"id":"cb34373beadf4f80","repo":"zed-industries/zed","slug":"failed-to-configure-input-mode-error","errorCode":null,"errorMessage":"Failed to configure input mode: {error:?}","messagePattern":"Failed to configure input mode: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_web/src/ime_mirror.rs","lineNumber":122,"sourceCode":"        style.set_property(\"width\", \"1px\").ok();\n        style.set_property(\"height\", \"1px\").ok();\n        style.set_property(\"opacity\", \"0\").ok();\n        // Android Chrome zooms the visual viewport onto a focused text input\n        // whose font is smaller than 16px; with page zoom disabled the user\n        // can never zoom back out, so keep the hidden IME input at 16px.\n        style.set_property(\"font-size\", \"16px\").ok();\n        body.append_child(&element)\n            .map_err(|e| anyhow::anyhow!(\"Failed to append input to body: {e:?}\"))?;\n        Self::focus_element(&element);\n        // The element must stay focused to receive hardware-key and IME\n        // events, but on touch-first devices a focused *editable* element\n        // invites the browser to summon the virtual keyboard on the next\n        // user gesture — including a scroll. Suppress the virtual keyboard\n        // until an editable tap, without disabling hardware IME composition.\n        if touch_input {\n            element\n                .set_attribute(\"inputmode\", \"none\")\n                .map_err(|error| anyhow::anyhow!(\"Failed to configure input mode: {error:?}\"))?;\n        }\n\n        let this = Self {\n            element,\n            text: RefCell::new(String::new()),\n            selection: Cell::new((0, 0)),\n            window_hint: Cell::new(0),\n            sync_scheduled: Cell::new(false),\n            selection_import_rejected: Cell::new(false),\n        };\n        // Until an input handler asks otherwise, the element is an IME\n        // conduit, not a form field: browser-side text assistance would\n        // mutate it behind the app's back.\n        this.apply_configuration(&TextInputConfiguration::default());\n        Ok(this)\n    }\n\n    /// Maps a [`TextInputConfiguration`] onto the element's text-assistance","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/gpui_web/src/ime_mirror.rs#L104-L140","documentation":"Surfaced during the gpui_web IME mirror setup when configuring the hidden 1x1 transparent input element used to capture IME input fails: a configuration call on the injected element returned an Err, and this message wraps the underlying error value. In a browser this is a sentinel for the DOM not accepting the element's style/attribute configuration, which breaks text-input composition handling for the web platform.","triggerScenarios":"Thrown at crates/gpui_web/src/ime_mirror.rs:122 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the page load in a standard browser environment; custom embedded webviews may lack the required DOM/style APIs","Verify no CSP or DOM mutation blocker interferes with dynamically appended input elements","Report the browser/WebView version and the rejected property from {error:?} so the unsupported call can be feature-detected"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-09-12T19:35:53.743Z","contentChangedAt":"2026-09-12T19:35:53.743Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}