Skip to content

Commit

Permalink
fix: new window correct background when browser in dark mode (#3382)
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 authored Oct 7, 2024
1 parent 733820e commit 62ce0eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/web/src/package/ui/KeyDialog/NewWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ export const NewWindow = (props: React.PropsWithChildren) => {
// When container is ready
if (container) {
// Create window
const win = window.open('', '', 'width=600,height=600,left=200,top=200');
const win = window.open(
'',
'_blank',
'width=600,height=600,left=200,top=200,toolbar=0'
);

if (!win) {
return;
Expand All @@ -38,6 +42,7 @@ export const NewWindow = (props: React.PropsWithChildren) => {
newWindow.current = win;
// Append container
win.document.body.style.margin = '0px';
win.document.body.style.background = 'white';
win.document.body.appendChild(container);

const onExit = () => {
Expand Down

0 comments on commit 62ce0eb

Please sign in to comment.