jqxWindow fixWindowZIndex bug

by David Dickinson

HTML

<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="http://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<div id='popupWindowStore'></div>

JavaScript

$(document).ready(function() {
  var popupWindow1 = $('<div>');

  var popupHeader1 = $('<div>');
  var popupContent1 = $('<div>');
  popupContent1.html("This is some content");
  popupHeader1.appendTo(popupWindow1).html("Window 1 (will be minimized)");
  popupContent1.appendTo(popupWindow1);
  popupWindow1.appendTo($('#popupWindowStore'));
  popupWindow1.jqxWindow({
    width: 640,
    height: 480,
    isModal: true,
    position: 'center',
    modalOpacity: 0.5,
    closeButtonAction: 'close',
    resizable: true
  });

  // now remove modal ,collapse and move

  popupWindow1.jqxWindow({
    isModal: false,
    collapsed: true,
    position: 'bottom, left'
  });

  // now display a second window - this will generate the error

  var popupWindow2 = $('<div>');

  var popupHeader2 = $('<div>');
  var popupContent2 = $('<div>');
  popupContent2.html("This is some content");
  popupHeader2.appendTo(popupWindow2).html("Window 2");
  popupContent2.appendTo(popupWindow2);
  popupWindow2.appendTo($('#popupWindowStore'));
  popupWindow2.jqxWindow({
    width: 640,
    height: 480,
    isModal: true,
    position: 'center',
    modalOpacity: 0.5,
    closeButtonAction: 'close',
    resizable: true
  });

});