fix: Enable long press selection on mobile for all modes
Previously, long press to select files only worked in singleClick mode,
making it impossible to select files on mobile devices in normal mode
where right-click is not available.
This fix enables long press selection regardless of singleClick setting,
which is essential for mobile usability.
Changes:
- Remove singleClick condition from handleLongPress
- Properly handle long press in itemClick for both modes
Fixes regression introduced in commit 8d752204
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5a9e3e8fe0
commit
25de12bc20
@ -225,7 +225,10 @@ const itemClick = (event: Event | KeyboardEvent) => {
|
||||
// If long press was triggered, prevent normal click behavior
|
||||
if (longPressTriggered.value) {
|
||||
longPressTriggered.value = false;
|
||||
return;
|
||||
// In non-singleClick mode, long press should only select, not open
|
||||
if (!singleClick.value) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
@ -318,10 +321,10 @@ const cancelLongPress = () => {
|
||||
};
|
||||
|
||||
const handleLongPress = () => {
|
||||
if (singleClick.value) {
|
||||
longPressTriggered.value = true;
|
||||
click(new Event("longpress"));
|
||||
}
|
||||
// Allow long press to select items regardless of singleClick mode
|
||||
// This is essential for mobile devices where right-click is not available
|
||||
longPressTriggered.value = true;
|
||||
click(new Event("longpress"));
|
||||
cancelLongPress();
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user