Commit a4aa203
committed
refactor(Datepicker): Extend HTMLElement directly
Drop the AlchemyHTMLElement base class in favor of a plain HTMLElement.
The base class reads innerHTML in its constructor, which violates the
Web Components spec and leaves cloned elements in an inconsistent
state when jQuery's clone(true) walks the subtree.
Bail out of connectedCallback after the async locale import if the
element was disconnected in the meantime. Without this guard, a fast
drag-drop would leak a flatpickr calendar onto a detached input
because the drop ghost gets disconnected before the import resolves.
Also guard disconnectedCallback with optional chaining so a teardown
before initialization does not throw.1 parent fcaf215 commit a4aa203
3 files changed
Lines changed: 13 additions & 16 deletions
File tree
- app
- assets/builds/alchemy
- javascript/alchemy_admin/components
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 6 | + | |
17 | 7 | | |
18 | | - | |
| 8 | + | |
19 | 9 | | |
20 | 10 | | |
21 | 11 | | |
22 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
23 | 16 | | |
24 | 17 | | |
25 | 18 | | |
26 | 19 | | |
27 | | - | |
28 | | - | |
| 20 | + | |
| 21 | + | |
29 | 22 | | |
30 | 23 | | |
31 | 24 | | |
| |||
56 | 49 | | |
57 | 50 | | |
58 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
59 | 56 | | |
60 | 57 | | |
61 | 58 | | |
0 commit comments