mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 10:39:32 +01:00
Revert "fix(tabs): a found tab still drops onto the tile grid during a rail search (#580)"
This reverts commit f152d551d1.
This commit is contained in:
1 parent
f152d551d1
commit
29c2701f83
6 files changed
+29
-75
No files matched your search
+8
-10
@@ -8240,6 +8240,14 @@ class CodemanApp {
|
||||
tab.setAttribute('draggable', 'true');
|
||||
|
||||
tab.addEventListener('dragstart', (e) => {
|
||||
// No drag while the rail search narrows the list: the drop rewrites the
|
||||
// order every device sees, relative to rows the search is hiding
|
||||
// (owner's call on #580). Refused here rather than by `draggable`,
|
||||
// because a keystroke in the box does not re-render the rows.
|
||||
if (this._tabRailSearchActive()) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
this.draggedTabId = tab.dataset.id;
|
||||
tab.classList.add('dragging');
|
||||
e.dataTransfer.effectAllowed = 'move';
|
||||
@@ -8256,13 +8264,6 @@ class CodemanApp {
|
||||
});
|
||||
|
||||
tab.addEventListener('dragover', (e) => {
|
||||
// No reorder while the rail search narrows the list: the drop rewrites
|
||||
// the order every device sees, relative to rows the search is hiding
|
||||
// (owner's call on #580). The rows refuse it here, never in dragstart
|
||||
// or via `draggable`: a found tab can still be dropped onto the tile
|
||||
// grid (per-device, nothing hidden to land beside), and a keystroke in
|
||||
// the box does not re-render the rows.
|
||||
if (this._tabRailSearchActive()) return;
|
||||
// Grouped by state: a tab in another group is not a drop target, and
|
||||
// leaving the event alone (no preventDefault) is what shows "no drop".
|
||||
if (this._isTabDropAcrossGroups(tab)) return;
|
||||
@@ -8294,9 +8295,6 @@ class CodemanApp {
|
||||
e.preventDefault();
|
||||
tab.classList.remove('drag-over-left', 'drag-over-right');
|
||||
|
||||
// dragover refuses it during a rail search; this holds should anything
|
||||
// above the row accept the drag and let a drop through.
|
||||
if (this._tabRailSearchActive()) return;
|
||||
if (!this.draggedTabId || this.draggedTabId === tab.dataset.id) return;
|
||||
if (this._isTabDropAcrossGroups(tab)) return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user