Skip to content
Permalink
Browse files
fix: prevent error overlay style being overridden (fixes #9969) (#9971)
  • Loading branch information
sapphi-red committed Sep 6, 2022
1 parent 31f5ff3 commit a7706d0d980307a91c443c6bb57e048cade7dc75
Showing 1 changed file with 20 additions and 9 deletions.
@@ -1,8 +1,17 @@
import type { ErrorPayload } from 'types/hmrPayload'

// set :host styles to make playwright detect the element as visible
const template = /*html*/ `
<style>
:host {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.backdrop {
position: fixed;
z-index: 99999;
top: 0;
@@ -99,15 +108,17 @@ code {
cursor: pointer;
}
</style>
<div class="window">
<pre class="message"><span class="plugin"></span><span class="message-body"></span></pre>
<pre class="file"></pre>
<pre class="frame"></pre>
<pre class="stack"></pre>
<div class="tip">
Click outside or fix the code to dismiss.<br>
You can also disable this overlay by setting
<code>server.hmr.overlay</code> to <code>false</code> in <code>vite.config.js.</code>
<div class="backdrop">
<div class="window">
<pre class="message"><span class="plugin"></span><span class="message-body"></span></pre>
<pre class="file"></pre>
<pre class="frame"></pre>
<pre class="stack"></pre>
<div class="tip">
Click outside or fix the code to dismiss.<br>
You can also disable this overlay by setting
<code>server.hmr.overlay</code> to <code>false</code> in <code>vite.config.js.</code>
</div>
</div>
</div>
`

0 comments on commit a7706d0

Please sign in to comment.