fix: clear background on back press (before transition), native-like
This commit is contained in:
1 parent
cac0f4169b
commit
1a8f7abaf3
1 file changed
+12
@@ -376,6 +376,18 @@
|
||||
}
|
||||
},
|
||||
back: function () {
|
||||
// Clear our CSS background immediately (before the
|
||||
// back transition), matching native Lampa behaviour.
|
||||
try {
|
||||
var bgel = document.querySelector('.background');
|
||||
if (bgel) {
|
||||
bgel.style.backgroundImage = '';
|
||||
bgel.style.filter = '';
|
||||
bgel.style.transform = '';
|
||||
bgel.style.opacity = '';
|
||||
}
|
||||
if (Lampa.Background && Lampa.Background.immediately) Lampa.Background.immediately('');
|
||||
} catch (e) {}
|
||||
Lampa.Activity.backward();
|
||||
},
|
||||
right: function () { Navigator.move('right'); },
|
||||
|
||||
Reference in new issue
Block a user