Skip to content

Commit

Permalink
[3578] Fix tooltip and menu visibility in a full screen mode
Browse files Browse the repository at this point in the history
Bug: #3578
Signed-off-by: Denis Nikiforov <[email protected]>
  • Loading branch information
AresEkb authored and sbegaudeau committed Jan 14, 2025
1 parent c6f72b6 commit e94ae78
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ This may have some consequences for downstream applications which are embedding
- https://github.com/eclipse-sirius/sirius-web/issues/4366[#4366] [form] Fix a warning in the reference widget
- https://github.com/eclipse-sirius/sirius-web/issues/4343[#4343] [table] Fix an issue where filters were reset on table opening
- https://github.com/eclipse-sirius/sirius-web/issues/4311[#4311] [table] Fix typos in table variables
- https://github.com/eclipse-sirius/sirius-web/issues/3578[#3578] [diagram] Fix tooltip and menu visibility in a full screen mode.
See https://github.com/mui/material-ui/issues/15618[this link] for additional details.

=== New Features

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2024 Obeo.
* Copyright (c) 2023, 2025 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -69,6 +69,10 @@ export const baseTheme: Theme = createTheme({
},
});

const container = () => {
return document.fullscreenElement ?? document.body;
};

export const siriusWebTheme = createTheme(
{
components: {
Expand All @@ -79,7 +83,17 @@ export const siriusWebTheme = createTheme(
},
},
},
MuiMenu: {
defaultProps: {
container,
},
},
MuiTooltip: {
defaultProps: {
PopperProps: {
container,
},
},
styleOverrides: {
tooltip: {
backgroundColor: baseTheme.palette.common.black,
Expand Down
16 changes: 15 additions & 1 deletion vscode-extension/src/view/app/theme/siriusWebTheme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2024 Obeo.
* Copyright (c) 2023, 2025 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -69,6 +69,10 @@ export const baseTheme: Theme = createTheme({
},
});

const container = () => {
return document.fullscreenElement ?? document.body;
};

export const siriusWebTheme = createTheme(
{
components: {
Expand All @@ -79,7 +83,17 @@ export const siriusWebTheme = createTheme(
},
},
},
MuiMenu: {
defaultProps: {
container,
},
},
MuiTooltip: {
defaultProps: {
PopperProps: {
container,
},
},
styleOverrides: {
tooltip: {
backgroundColor: baseTheme.palette.common.black,
Expand Down

0 comments on commit e94ae78

Please sign in to comment.