zed-industries/zed · error
Failed to configure input mode: {error:?}
Error message
Failed to configure input mode: {error:?} What it means
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.
Source
Thrown at crates/gpui_web/src/ime_mirror.rs:122
style.set_property("width", "1px").ok();
style.set_property("height", "1px").ok();
style.set_property("opacity", "0").ok();
// Android Chrome zooms the visual viewport onto a focused text input
// whose font is smaller than 16px; with page zoom disabled the user
// can never zoom back out, so keep the hidden IME input at 16px.
style.set_property("font-size", "16px").ok();
body.append_child(&element)
.map_err(|e| anyhow::anyhow!("Failed to append input to body: {e:?}"))?;
Self::focus_element(&element);
// The element must stay focused to receive hardware-key and IME
// events, but on touch-first devices a focused *editable* element
// invites the browser to summon the virtual keyboard on the next
// user gesture — including a scroll. Suppress the virtual keyboard
// until an editable tap, without disabling hardware IME composition.
if touch_input {
element
.set_attribute("inputmode", "none")
.map_err(|error| anyhow::anyhow!("Failed to configure input mode: {error:?}"))?;
}
let this = Self {
element,
text: RefCell::new(String::new()),
selection: Cell::new((0, 0)),
window_hint: Cell::new(0),
sync_scheduled: Cell::new(false),
selection_import_rejected: Cell::new(false),
};
// Until an input handler asks otherwise, the element is an IME
// conduit, not a form field: browser-side text assistance would
// mutate it behind the app's back.
this.apply_configuration(&TextInputConfiguration::default());
Ok(this)
}
/// Maps a [`TextInputConfiguration`] onto the element's text-assistanceView on GitHub (pinned to 9d272b0363)
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/gpui_web/src/ime_mirror.rs:122 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-09-12).
Data as JSON: /api/errors/cb34373beadf4f80.
Report an issue: GitHub.