fix: prevent NP overlay from flickering through to content below on Android WebView
Replace will-change:transform with translate3d(0,100%,0) / translate3d(0,0,0). will-change triggers a layer-creation/destruction cycle on WebView — when the player bar DOM updates during a skip, the compositor can briefly expose the layer's clear back buffer, flashing the content below through the overlay. translate3d pins the element to a stable GPU layer from the start. Also add contain:layout style paint to isolate the overlay's paint context from external repaints, and -webkit-backface-visibility for older WebView. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
0552b3f5d0
commit
3c9a8e892a
1 file changed
+6
-4
+6
-4
@@ -573,14 +573,16 @@ button:focus{outline:none}
|
||||
position:fixed;inset:0;z-index:300;
|
||||
display:flex;flex-direction:column;
|
||||
background:var(--bg);
|
||||
transform:translateY(100%);
|
||||
/* translate3d keeps the element on a stable GPU layer without will-change's
|
||||
layer-creation/destruction cycle that causes WebView to flash the content below */
|
||||
transform:translate3d(0,100%,0);
|
||||
transition:transform .35s cubic-bezier(.4,0,.2,1);
|
||||
overflow:hidden;
|
||||
will-change:transform;
|
||||
backface-visibility:hidden;
|
||||
backface-visibility:hidden;-webkit-backface-visibility:hidden;
|
||||
contain:layout style paint;
|
||||
isolation:isolate;
|
||||
}
|
||||
.np-overlay.open{transform:translateY(0)}
|
||||
.np-overlay.open{transform:translate3d(0,0,0)}
|
||||
|
||||
/* Blurred album art as background — two layers for crossfade */
|
||||
.np-bg{
|
||||
|
||||
Reference in new issue
Block a user