From a9d139ba47b729e04a6f2451356128538d6bf8e7 Mon Sep 17 00:00:00 2001 From: temportalflux Date: Mon, 22 Jun 2026 16:54:03 -0400 Subject: [PATCH] manually mark editable text elements as stateful-interactive so overflow can be specified --- crates/gpui_elements/src/editable_text/input_element.rs | 4 +++- crates/gpui_elements/src/editable_text/text_area_element.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/gpui_elements/src/editable_text/input_element.rs b/crates/gpui_elements/src/editable_text/input_element.rs index c50a830eed..73dfd2b15b 100644 --- a/crates/gpui_elements/src/editable_text/input_element.rs +++ b/crates/gpui_elements/src/editable_text/input_element.rs @@ -5,7 +5,7 @@ use crate::editable_text::{ }; use gpui::{ App, Bounds, Element, ElementId, InteractiveElement, Interactivity, IntoElement, Pixels, - SharedString, StyleRefinement, Styled, WeakEntity, Window, + SharedString, StatefulInteractiveElement, StyleRefinement, Styled, WeakEntity, Window, }; use std::{cell::RefCell, rc::Rc}; @@ -54,6 +54,8 @@ impl InteractiveElement for TextInputElement { } } +impl StatefulInteractiveElement for TextInputElement {} + impl Styled for TextInputElement { fn style(&mut self) -> &mut StyleRefinement { &mut self.interactivity.base_style diff --git a/crates/gpui_elements/src/editable_text/text_area_element.rs b/crates/gpui_elements/src/editable_text/text_area_element.rs index c10ec89ebd..35adb38811 100644 --- a/crates/gpui_elements/src/editable_text/text_area_element.rs +++ b/crates/gpui_elements/src/editable_text/text_area_element.rs @@ -5,7 +5,7 @@ use crate::editable_text::{ }; use gpui::{ App, Bounds, Element, ElementId, InteractiveElement, Interactivity, IntoElement, Pixels, - SharedString, StyleRefinement, Styled, WeakEntity, Window, + SharedString, StatefulInteractiveElement, StyleRefinement, Styled, WeakEntity, Window, }; use std::{cell::RefCell, rc::Rc}; @@ -53,6 +53,8 @@ impl InteractiveElement for TextAreaElement { } } +impl StatefulInteractiveElement for TextAreaElement {} + impl Styled for TextAreaElement { fn style(&mut self) -> &mut StyleRefinement { &mut self.interactivity.base_style