@lightningjs/blits 2.8.4 → 2.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/package.json +1 -1
- package/src/engines/L3/element.js +1 -0
- package/src/router/router.js +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.8.6
|
|
3
4
|
|
|
5
|
+
_30 jul 2026_
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
- Fixed destroying orphaned views when keepAlive is true but route is not in history
|
|
8
|
+
|
|
9
|
+
## 2.8.5
|
|
10
|
+
|
|
11
|
+
_29 jul 2026_
|
|
12
|
+
|
|
13
|
+
- Fixed EOL issue in transition progress callback
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## 2.8.4
|
|
6
17
|
|
|
7
18
|
_23 jul 2026_
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -919,6 +919,7 @@ const Element = {
|
|
|
919
919
|
if (transition.progress !== undefined && typeof transition.progress === 'function') {
|
|
920
920
|
let prevProgress = 0
|
|
921
921
|
f.on('tick', (_node, { progress }) => {
|
|
922
|
+
if (this.eol === true || !this.config) return
|
|
922
923
|
transition.progress.call(this.component, this, prop, progress, prevProgress)
|
|
923
924
|
prevProgress = progress
|
|
924
925
|
})
|
package/src/router/router.js
CHANGED
|
@@ -342,7 +342,9 @@ export const navigate = async function () {
|
|
|
342
342
|
? viewState.overrideOptions.keepAlive
|
|
343
343
|
: this.previousRoute.options && this.previousRoute.options.keepAlive
|
|
344
344
|
|
|
345
|
-
// cache the page when it's as 'keepAlive' instead of destroying
|
|
345
|
+
// cache the page when it's marked as 'keepAlive' instead of destroying,
|
|
346
|
+
// but only when navigating forward AND the route is in history (so it can be restored on back)
|
|
347
|
+
let cached = false
|
|
346
348
|
if (
|
|
347
349
|
viewState.navigatingBack === false &&
|
|
348
350
|
keepAlive === true &&
|
|
@@ -354,6 +356,7 @@ export const navigate = async function () {
|
|
|
354
356
|
if (historyItem !== undefined) {
|
|
355
357
|
historyItem.view = oldView
|
|
356
358
|
historyItem.focus = viewState.previousFocus
|
|
359
|
+
cached = true
|
|
357
360
|
}
|
|
358
361
|
}
|
|
359
362
|
|
|
@@ -361,8 +364,13 @@ export const navigate = async function () {
|
|
|
361
364
|
* 1. Navigating forward, and the previous route is not configured with "keep alive" set to true.
|
|
362
365
|
* 2. Navigating back, and the previous route is configured with "keep alive" set to true.
|
|
363
366
|
* 3. Navigating back, and the previous route is not configured with "keep alive" set to true.
|
|
367
|
+
* 4. Navigating forward, keepAlive is true but caching failed (no inHistory or no history
|
|
368
|
+
* item) — destroy to prevent orphaned components leaking in the eventsMap.
|
|
364
369
|
*/
|
|
365
|
-
if (
|
|
370
|
+
if (
|
|
371
|
+
(this.previousRoute.options && (keepAlive !== true || viewState.navigatingBack === true)) ||
|
|
372
|
+
!cached
|
|
373
|
+
) {
|
|
366
374
|
oldView.destroy()
|
|
367
375
|
oldView = null
|
|
368
376
|
}
|