-
-
Notifications
You must be signed in to change notification settings - Fork 311
Open
Description
I have an issue with the text edit in native Linux that when the user enters text the very first time, the backspace doesn't work. It seems to be related to an IME issue in native Linux. Egui has changed the code a bit to fix this.
It seems that the bevy_egui is a bit out of sync.
Steps to repro:
[package]
name = "bevy_egui_test"
version = "0.1.0"
edition = "2024"
[dependencies]
bevy = "0.17.0"
bevy_egui = "0.38.0"
use bevy::prelude::*;
use bevy_egui::{EguiContexts, EguiPlugin, EguiPrimaryContextPass, egui};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(EguiPlugin::default())
.add_systems(Startup, setup_camera_system)
.add_systems(EguiPrimaryContextPass, ui_example_system)
.run();
}
fn setup_camera_system(mut commands: Commands) {
commands.spawn(Camera2d);
}
fn ui_example_system(mut contexts: EguiContexts, mut text: Local<String>) -> Result {
egui::Window::new("Hello").show(contexts.ctx_mut()?, |ui| {
ui.label("world");
let text = &mut (*text);
if ui.text_edit_singleline(text).changed() {
println!("{text}");
}
});
Ok(())
}
In native Linux,
- Click on the text edit and enter some text.
- Press backspace to try to delete some characters.
- Nothing happens.
Expected behaviour:
Pressing backspace should delete the characters at the end.
Thank you in advance.
WenSimEHRP and vultix
Metadata
Metadata
Assignees
Labels
No labels