mirror of
https://github.com/zen-browser/desktop.git
synced 2026-08-12 17:55:19 +00:00
fix: Only set display none on zap after dissolve
This commit is contained in:
@@ -156,6 +156,8 @@ void main() {
|
||||
|
||||
#onComplete = null;
|
||||
|
||||
#onComplete = null;
|
||||
|
||||
/**
|
||||
* @param {Document} document Webpage document
|
||||
*/
|
||||
@@ -485,6 +487,7 @@ void main() {
|
||||
* @param {Element} element The element to dissolve
|
||||
* @param {Function} onComplete Callback for when the animation is complete
|
||||
*/
|
||||
dissolve(element, onComplete) {
|
||||
dissolve(element, onComplete) {
|
||||
if (!this.#initialized || this.#hasTriggered || !element) {
|
||||
return;
|
||||
@@ -493,6 +496,8 @@ void main() {
|
||||
|
||||
this.#onComplete = onComplete;
|
||||
|
||||
this.#onComplete = onComplete;
|
||||
|
||||
const rect = element.getBoundingClientRect();
|
||||
if (rect.width === 0 || rect.height === 0) {
|
||||
console.warn("[ZapDissolve]: element has zero size. Skipping dissolve");
|
||||
|
||||
@@ -197,10 +197,10 @@ export class ZapOverlay {
|
||||
this.onZapUpdate();
|
||||
|
||||
this.window.requestAnimationFrame(() => {
|
||||
element.style.visibility = "initial";
|
||||
element.style.removeProperty("opacity");
|
||||
});
|
||||
});
|
||||
element.style.visibility = "hidden";
|
||||
element.style.setProperty("opacity", "0", "!important");
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user