Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[menubar] Icon from one menubar bleeds into overlay of another menubar #7489

Open
sissbruecker opened this issue Jun 17, 2024 · 1 comment
Open
Labels

Comments

@sissbruecker
Copy link
Contributor

Description

When rendering two menubars below each other, where both have a button with an icon, then the icon of the second menubar bleeds into the overlay of the first menubar when it is opened.

Initially:
Bildschirmfoto 2024-06-17 um 15 42 56

After opening first menubar:
Bildschirmfoto 2024-06-17 um 15 43 02

The issue only seems to reproduce in Firefox. It also doesn't reproduce when just rendering a regular vaadin-icon below the menubar.

Expected outcome

The icon should not display over the menubar overlay.

Minimal reproducible example

<vaadin-menu-bar></vaadin-menu-bar>
<vaadin-menu-bar></vaadin-menu-bar>
<script type="module">
  import '@vaadin/menu-bar';
  import '@vaadin/icon';
  import '@vaadin/icons/vaadin-iconset.js';

  const menuBars = document.querySelectorAll('vaadin-menu-bar');
  menuBars.forEach((menuBar) => {
    const icon = document.createElement("vaadin-icon");
    icon.icon = "vaadin:phone";

    menuBar.items = [
      {
        component: icon,
        children: [
          { text: 'Test' },
        ],
      }
    ];
  });
</script>

Steps to reproduce

  1. Add the snippet above to a page
  2. Open the first menu bar

Environment

Vaadin version(s): Reproduces since 24.2, works in 24.1 and 23.4

Browsers

Firefox

@yuriy-fix yuriy-fix added bug Something isn't working Severity: Major Impact: Low vaadin-menu-bar regression Sometimes we make things break labels Jun 20, 2024
@FrediWa FrediWa self-assigned this Jun 24, 2024
@FrediWa
Copy link
Contributor

FrediWa commented Jun 25, 2024

The issue seems to be caused by container-type: size; in vaadin-icon. Removing this single line from vaadin-icon-styles.js is workaround for the problem. However the real problem seems to be in Firefox. FF127 should support container-type: size; but it obviously does not. This leads to a lot of interesting rendering symptoms. For instance, with multiple menu bars, the issue persists only if the last menu bar has icons, and in this case only for icons in the last menu bar.

@FrediWa FrediWa removed their assignment Jul 18, 2024
@FrediWa FrediWa assigned FrediWa and unassigned FrediWa Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants