-
Notifications
You must be signed in to change notification settings - Fork 511
[dialog] macOS: Keyboard input inverted after plugin initialization #3245
Description
Description
When tauri-plugin-dialog is initialized on macOS, keyboard input becomes inverted. Users must hold Command (⌘) to type normally. Without holding ⌘, keys don't register or trigger incorrect actions.
The bug occurs immediately on app launch - no dialog needs to be opened. Simply calling .plugin(tauri_plugin_dialog::init()) causes the issue.
Reproduction
Minimal reproduction repo: https://github.com/jpoindexter/tauri-dialog-keyboard-bug
git clone https://github.com/jpoindexter/tauri-dialog-keyboard-bug
cd tauri-dialog-keyboard-bug
npm install
npm run tauri devThen try typing in the input field.
Expected Behavior
Normal keyboard input
Actual Behavior
- Keys don't register when typed normally
- Must hold ⌘ (Command) key to type
- Modifier key state appears corrupted/inverted
Workaround
Comment out the plugin initialization:
// .plugin(tauri_plugin_dialog::init())Keyboard works normally without the plugin.
Environment
- OS: macOS 15.x (Darwin 25.3.0)
- Tauri: 2.2+
- tauri-plugin-dialog: 2.2+
Likely Cause
The issue appears to be in how the rfd crate handles NSOpenPanel focus/events on macOS, causing the modifier key state to become corrupted even before any dialog is opened.