IE10 content disappears on second hang

Error script: http://jsfiddle.net/GZdqh/8/

This error only appears in IE10 in both Windows 7 and 8. It does not occur in IE8, IE9, or IE11.

Steps to recreate:

  • hover over the link with a drop-down menu (menu item 1st-2), the contents will appear.
  • drag the mouse out of the drop-down list and let the indentation disappear.
  • hover over the same link, the content will not appear where it was before.

The UL wrapper seems to appear, but with no content inside it.

I struggled to find a solution, it's hard to describe, I'm not sure that the โ€œsecond gunnerโ€ is descriptive enough, but I could not think of anything.

html:

<header>
    <nav>
        <ul id="navigation">
            <li class="current"><a href="#" title="Home">Home</a></li>
            <li class="drop">
                <a href="#" title="Menu Item 1st - 2">Menu Item 1st - 2</a>
                <ul>
                    <li>
                        <a href="#" title="Menu Item 2nd - 1">Menu Item 2nd - 1</a>
                        <ul>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 1</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 2</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 3</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 4</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="#" title="Menu Item 2nd - 1">Menu Item 2nd - 2</a>
                        <ul>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 1</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 2</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 3</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 4</a></li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li class="drop">
                <a href="#" title="Menu Item 1st - 2">Menu Item 1st - 3</a>
                <ul>
                    <li>
                        <a href="#" title="Menu Item 2nd - 1">Menu Item 2nd - 1</a>
                        <ul>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 1</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 2</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 3</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 4</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="#" title="Menu Item 2nd - 1">Menu Item 2nd - 2</a>
                        <ul>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 1</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 2</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 3</a></li>
                            <li><a href="#" title="Menu Item 3rd - 1">Menu Item 3rd - 4</a></li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>
    </nav>
</header>

css:

header {
  position: relative;
  z-index: 2; }
  header nav {
    clear: both;
    margin-bottom: 10px; }
    header nav a {
      font-family: "Open Sans";
      font-weight: 400; }
    header nav > ul {
      background-color: #3a3db6;
      background-image: linear-gradient(#3a3db6, #3639a3);
      width: 100%;
      height: 30px;
      padding: 5px 0; }
      header nav > ul > li > ul {
        display: none;
        overflow: hidden;
        position: absolute;
        top: 40px;
        border-radius: 0 10px 10px 10px;
        background: white;
        background-image: linear-gradient(white 1%, #efefef 4%, white 6%);
        padding: 20px 10px 10px 10px;
        min-width: 600px;
        box-shadow: 0px 0px 5px #333333;
        z-index: 3;
        column-count: 3;
        column-gap: 20px; }
      header nav > ul > li {
        display: block;
        float: left;
        position: relative;
        border-right: 1px solid #6165dd;
        margin-right: -1px; }
        header nav > ul > li:last-of-type {
          border-right: 0; }
        header nav > ul > li > a {
          display: block;
          line-height: 30px;
          text-align: center;
          color: white;
          text-decoration: none;
          font-family: "Open Sans";
          font-weight: 400;
          padding: 0 15px; }
        header nav > ul > li > a:hover {
            color: #f9c00d; }
        header nav > ul > li.drop:hover {
          height: 30px; }
          header nav > ul > li.drop:hover > a {
            position: relative;
            background: white;
            width: 90%;
            margin-top: -10px;
            height: 50px;
            line-height: 50px;
            border-right: 0;
            border-radius: 10px 10px 0 0;
            z-index: 4;
            color: #3a3db6;
            box-shadow: 0px 0px 5px #333333;
            background-image: linear-gradient(#efefef 0, white 20%); }
            header nav > ul > li.drop:hover > a:after {
              content: "";
              display: block;
              position: absolute;
              background: white;
              bottom: -4px;
              left: 0;
              right: 0;
              height: 4px; }
          header nav > ul > li.drop:hover > ul {
            display: block; }
            header nav > ul > li.drop:hover > ul a {
              display: block;
              text-decoration: none;
              color: #3a3db6; }
              header nav > ul > li.drop:hover > ul a:hover {
                text-decoration: underline; }
            header nav > ul > li.drop:hover > ul > li {
              padding-bottom: 10px; }
            header nav > ul > li.drop:hover > ul ul a {
              color: dimgrey;
              font-size: 80%;
              padding-left: 14px;
              margin-left: 9px;
              background: url(/images/nav-list.png) no-repeat left top; }
            header nav > ul > li.drop:hover > ul ul li:last-of-type a {
              background-position: left bottom; }
+3
source
1

z-index, visibility?

DEMO

.

header nav > ul > li > ul {
    /*display:block;*/
    visibility:hidden;
}

header nav > ul > li.drop:hover > ul {
    /*display:block;*/
    visibility:visible;
}

, IE10 display:block;, - .

+1

All Articles