Return key triggers focused item click in modal with primary action #2173
Labels
app/desktop
app/web
Bug
Created by Linear-GitHub Sync
Desktop (Client)
Created by Linear-GitHub Sync
good first issue
Good for newcomers
Improvement
Created by Linear-GitHub Sync
kind/bug
Something isn't working
Low priority
Created by Linear-GitHub Sync
web
Describe the bug
Background
By default, at least on macOS, the return key triggers the primary action on an active modal.
In this example where Keyboard Navigation is enabled in System Settings — despite "Cancel" being focused, pressing return will press "Modify Settings" and submit the login form.
In Spacedrive, an open and focused modal will trigger the focused button when return is pressed even if a primary action is present.
Reproduction
After sending return, the focused action (Cancel) was triggered and the tag was not deleted.
Expected behavior
After sending the return keystroke, the primary action (Delete) should have triggered and deleted the tag.
Platform and versions
macOS: 14.3.1 (Sonoma, 23D60)
Spacedrive: v0.2.5 (55d2ec7)
Stack trace
No response
Additional context
In most cases, space is the key used to trigger the focused button rather than return/enter.
The text was updated successfully, but these errors were encountered: