You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Attempting to call request_focus() on a single line text edit every time it loses focus will eventually cause the TextEdit to ignore any further key presses.
This happens on native build (egui 0.29) for Linux with eframe. Have not tested on MacOS or Windows. Does not occur on webassembly build (tested in firefox)
To Reproduce
Steps to reproduce the behavior:
Checkout the latest eframe_template (using egui 0.29)
Replace this line: ui.text_edit_singleline(&mut self.label);
with this block (the point being to restore focus on the input field every time after pressing enter): let response = ui.text_edit_singleline(&mut self.label); if !response.has_focus() { response.request_focus(); }
Run the demo and type something in the test box and hit enter
Notice that focus was restored to the text box
Type some more characters, then hold down the enter key for a few seconds
Try to type some more characters
Notice that the text field now ignores all further input (if problem doesn't yet occur, repeat step 5 - this is reproducible every time on my system after a few attempts at most)
Expected behavior
Regardless of how many times the text box loses focus due to pressing enter, the focus should still be restored and the text box should accept further input.
Desktop (please complete the following information):
Tested on Linux Mint with egui 0.29
Problem does not occur on wasm build (tested in Firefox)
The text was updated successfully, but these errors were encountered:
Describe the bug
Attempting to call request_focus() on a single line text edit every time it loses focus will eventually cause the TextEdit to ignore any further key presses.
This happens on native build (egui 0.29) for Linux with eframe. Have not tested on MacOS or Windows. Does not occur on webassembly build (tested in firefox)
To Reproduce
Steps to reproduce the behavior:
ui.text_edit_singleline(&mut self.label);
with this block (the point being to restore focus on the input field every time after pressing enter):
let response = ui.text_edit_singleline(&mut self.label); if !response.has_focus() { response.request_focus(); }
Expected behavior
Regardless of how many times the text box loses focus due to pressing enter, the focus should still be restored and the text box should accept further input.
Desktop (please complete the following information):
Tested on Linux Mint with egui 0.29
Problem does not occur on wasm build (tested in Firefox)
The text was updated successfully, but these errors were encountered: