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
{{ message }}
Repository navigation
[Enhancement] Add safety setting to prevent accidental deletions from double-clicks or double-keypresses #330
When a user triggers a deletion for a history item, a confirmation prompt appears to prevent accidental data loss. However, if a user rapidly double-clicks the delete button or double-presses the keyboard shortcut/Enter key, they can instantly bypass this safety net and delete the item by accident.
To give users more control over their workflow speed versus data safety, this behavior should be configurable within the application settings.
Proposed Solution
Add a new toggle option under the Clipboard History Settings section to enforce a brief input delay on deletion confirmations.
Settings UI Integration
Location: Settings > Clipboard History Settings
Label: Enforce Delete Confirmation Delay
Description: Prevents accidental data loss by briefly disabling the confirmation button (for 300ms) to block accidental double-clicks or double-keypresses.
Expected Behavior
When Enabled (Default/Safe Mode):
When the delete prompt appears, the confirmation action will ignore inputs for a short window (e.g., 300ms) before allowing the user to click or press Enter to confirm.
This stops rapid, unintentional double-inputs from instantly wiping out items.
When Disabled (Fast Mode):
No input delay is applied. The confirmation prompt responds instantly to rapid inputs for users who prefer maximum speed when cleaning up history.
Technical Context / Suggested Fix
State Management: Connect the toggle state to the local configuration storage.
Component Level: In the deletion confirmation modal/popover, check this setting on mount. If enabled, apply a transient disabled state to the confirmation button using a standard setTimeout fallback, or ignore early keyboard events until the safety window closes.
Activity