Skip to content

Commit 340e762

Browse files
author
dcz
committed
demo works
1 parent 820a6be commit 340e762

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/views/text_input.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use floem_renderer::Renderer;
1515
use ui_events::keyboard::{Key, KeyState, KeyboardEvent, Modifiers, NamedKey};
1616
use ui_events::pointer::{PointerButton, PointerButtonEvent, PointerEvent};
1717
use unicode_segmentation::UnicodeSegmentation;
18+
use winit::event::ImeAction;
1819
use winit::window::ImeSurroundingText;
1920

2021
use crate::{peniko::color::palette, style::Style, view::View};
@@ -1387,8 +1388,14 @@ impl View for TextInput {
13871388
}
13881389
Event::ImeAction(action) => {
13891390
if self.is_focused {
1390-
dbg!(action);
1391-
true
1391+
match action {
1392+
ImeAction::Finish => {
1393+
if let Some(action) = &self.on_enter {
1394+
action();
1395+
}
1396+
true
1397+
}
1398+
}
13921399
} else {
13931400
false
13941401
}

0 commit comments

Comments
 (0)