Skip control characters if they are somehow passed in as a char to on_char_key.

This commit is contained in:
ClementTsang 2020-02-24 20:07:38 -05:00
parent 8d23f0661c
commit ceaedad6dc

View file

@ -771,6 +771,12 @@ impl App {
pub fn on_char_key(&mut self, caught_char: char) {
// Forbid any char key presses when showing a dialog box...
// Skip control code chars
if caught_char.is_control() {
return;
}
if !self.is_in_dialog() {
let current_key_press_inst = Instant::now();
if current_key_press_inst