mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
fix: end a tab drag when the card is disconnected
Validate / docs (push) Failing after 31s
Validate / provenance (push) Successful in 1m7s
Validate / process-gate (push) Failing after 1m11s
Validate / changes (push) Successful in 57s
Validate / hacs (push) Skipped
Validate / hassfest (push) Skipped
Validate / reuse (push) Successful in 1m30s
Validate / backend (push) Skipped
Validate / frontend (push) Successful in 12m25s
Validate / golden (push) Failing after 12m39s
Validate / performance_smoke (push) Failing after 11m36s
Validate / smoke (push) Failing after 27m40s
Validate / docs (push) Failing after 31s
Validate / provenance (push) Successful in 1m7s
Validate / process-gate (push) Failing after 1m11s
Validate / changes (push) Successful in 57s
Validate / hacs (push) Skipped
Validate / hassfest (push) Skipped
Validate / reuse (push) Successful in 1m30s
Validate / backend (push) Skipped
Validate / frontend (push) Successful in 12m25s
Validate / golden (push) Failing after 12m39s
Validate / performance_smoke (push) Failing after 11m36s
Validate / smoke (push) Failing after 27m40s
Review CODE-REVIEW-220-r2/r3, F1. The M1 fix installs window listeners for the length of the gesture, and disconnectedCallback — which takes down everything else, down to the other local gesture — did not take those down. Losing the card mid-drag (Lovelace rebuilding its tree, the user leaving the view with the button still down) left them alive: the closure holds the instance and its config, and the next pointerup anywhere on the page would have an invisible card write its order. The smoke now holds a tab, removes the card, and checks that the release it should no longer hear changes nothing. Registered as a mutant too. Issue: #220 User-Visible: no
This commit is contained in:
@@ -762,6 +762,18 @@ export const MUTANTS = [
|
||||
replace: ' void 0;',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'tab-drag-outlives-the-card',
|
||||
guard: 'node demo/smoke_space_tab_reorder.mjs',
|
||||
because: 'слушатели жеста, пережившие disconnectedCallback, держат инстанс карточки '
|
||||
+ 'и дают невидимой карточке записать порядок по следующему pointerup на странице '
|
||||
+ '(ревью r2/r3, F1)',
|
||||
patches: [{
|
||||
file: 'src/houseplan-card.ts',
|
||||
find: ' this._endTabDrag();\n clearInterval(this._cycleTimer);',
|
||||
replace: ' clearInterval(this._cycleTimer);',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'tab-reorder-eats-click',
|
||||
guard: 'node --test --test-name-pattern="issue 220" test/space-order.test.mjs',
|
||||
|
||||
Reference in New Issue
Block a user