Repository navigation
Commit 4fa663f
committed
fix: introduce non-selectable item handling to isolate system utility tiles during batch operations
Add non-selectable element safeguards across templates and touch selection handlers to prevent system utility tiles from being highlighted, checked, or included in multi-item batch actions.
System notification tiles, such as "Add a storage" prompts and "Select document" system actions, reside in the same DOM list container as regular files and directories. Previously, initiating a "Select All" command or dragging across the file list would accidentally select these utility items, triggering runtime errors during batch operations like deletion or moving.
* **Template Contract (`src/pages/fileBrowser/list.hbs`):**
* Added support for the `data-not-selectable` HTML dataset attribute flag on list item nodes.
* **Tile Configuration:**
* Explicitly configured system utility tiles ("add a storage" and "Select document") with `notSelectable: true` in their template render context.
* **Selection Safeguards (`src/pages/fileBrowser/fileBrowser.js`):**
* Updated touch event delegation, long-press handlers, and "Select All" toggle utility functions to check for `dataset.notSelectable != null`.
* Items flagged as non-selectable are automatically bypassed during selection count updates, bulk checkboxes, and context action payload generation.
(AI generated commit message)1 parent 7c68ddd commit 4fa663f
2 files changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
| 863 | + | |
863 | 864 | | |
864 | 865 | | |
865 | 866 | | |
| |||
912 | 913 | | |
913 | 914 | | |
914 | 915 | | |
915 | | - | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
916 | 919 | | |
917 | 920 | | |
918 | | - | |
919 | | - | |
920 | | - | |
| 921 | + | |
921 | 922 | | |
922 | 923 | | |
923 | 924 | | |
| |||
1394 | 1395 | | |
1395 | 1396 | | |
1396 | 1397 | | |
| 1398 | + | |
1397 | 1399 | | |
1398 | 1400 | | |
1399 | 1401 | | |
1400 | 1402 | | |
1401 | 1403 | | |
1402 | 1404 | | |
| 1405 | + | |
1403 | 1406 | | |
1404 | 1407 | | |
1405 | 1408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
0 commit comments