manually mark editable text elements as stateful-interactive so overflow can be specified

This commit is contained in:
temportalflux
2026-07-11 09:31:07 -04:00
parent a6aebd6ae4
commit a9d139ba47
2 changed files with 6 additions and 2 deletions
@@ -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
@@ -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