framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.06k stars 3.23k forks source link

Dropdown menu in Navbar is not opened correctly #3540

Closed mjablecnik closed 4 years ago

mjablecnik commented 4 years ago

Describe the bug

In framework7-svelte when I add dropdown Menu into Navbar to right position and open it so it is rewritten by Subnavbar: https://forum.framework7.io/uploads/default/original/2X/a/a1d02fb0f2b09d016fd0d8581a93216f5b9f31d5.png

My code is:

  <Navbar title="Navbar title">
    <Subnavbar> Test </Subnavbar>

    <NavRight>
      <MenuItem style="margin-left: auto" iconF7="square_arrow_up" dropdown>
        <MenuDropdown right>
          <MenuDropdownItem href="#" text="Menu Item 1" />
          <MenuDropdownItem href="#" text="Menu Item 2" />
          <MenuDropdownItem href="#" text="Menu Item 3" />
        </MenuDropdown>
      </MenuItem>
    </NavRight>

  </Navbar>

Expected behavior

Show opened dropdown menu in Navbar correctly.

nolimits4web commented 4 years ago

This will require to tweak a bit z-index, try to add this:

  <NavRight class="right-with-menu">

and in CSS:

.navbar .right-with-menu {
  z-index: 700;
}
mjablecnik commented 4 years ago

I tried your solution, but it still don't work for me.