Skip to content

Changed behavior of TextEdit after eframe 0.23 to 0.28.1 update #5110

Answered by YgorSouza
Shtoyan asked this question in Q&A
Discussion options

You must be logged in to vote

There have been some changes to how the focus works, to try and fix bugs related to things like tab order, and many changes to how responses work in general as well. I guess one consequence is that now the TextEdit loses focus on button press, whereas the click event is on button release, which comes in a later frame. One quick and dirty fix would be to make the button act on press rather than release, so it will happen on the same frame as the lost focus. Here is an example:

impl eframe::App for MyApp {
    fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
        egui::CentralPanel::default().show(ctx, |ui| {
            let mut save = false;
            let respon…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Shtoyan
Comment options

Answer selected by Shtoyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants