Skip to content

Commit

Permalink
fix: Prevent saving empty key values in input handling closing :#83
Browse files Browse the repository at this point in the history
  • Loading branch information
caneeeeee committed Jan 28, 2025
1 parent 8ee746e commit d293a41
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct PressKeyListenerModal: View {
return
}

if input.keyCode != kVK_Escape || (input.keyCode == kVK_Escape && self.escapeKeyStreak > 1) {
if (input.keyCode != kVK_Escape || (input.keyCode == kVK_Escape && self.escapeKeyStreak > 1)) && !input.readable.isEmpty {
self.formState.pressInput = input

self.escapeKeyStreak = 0
Expand Down

0 comments on commit d293a41

Please sign in to comment.