Hrome hover error when calling window.open ().

I believe there is a bug in chrome for freezing when opening a new window.

The following code demonstrates this:

<!DOCTYPE HTML>
<html>
<head>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js" type="text/javascript"></script>
<style>

#outter {
   height:30px;
   width:30px;
   background-color:grey;
   position:relative;
}

#outter:hover {
   cursor:pointer;
   background-color:red;
}

#menuBox {
   position:absolute;
   top:100%;
   width:100px;
   height:100px;
   border:1px solid black;
   display:none;
}

.menuItem {
   height:20px;
}

.menuItem:hover {
   background-color:grey;
}

</style>


<script>

$(document).ready(function() {
   $("#outter").on("click",function() {
      $("#menuBox").toggle();
});

$(".menuItem").on("click",function() {
   window.open(
       "http://www.google.com",
       "",
      "menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=100,height=100,top=100,left=100");
   });

});
</script>


</head>
<body>

<div id="outter">

   <div id="menuBox">
      <div class="menuItem">1</div>
      <div class="menuItem">2</div>
   </div>
</div>

</body>
</html>

      

Playback:

  • Select a square to open the container
  • select menu item
  • close an open window.
  • select square again

** BUG crashes as you can see the menu item is highlighted as if it were hovering **

Can someone tell me if they get this with other versions of chrome?

I am running version 57.0.2987.133 (64-bit) on Mac OsX

+3


source to share





All Articles