title: Incorrect popup shadow position after moving popup in RichFaces 4.x
body: <p>I have popup with autosized attribute. Panel contains fields for search, search button, datatable and datascroller. After press search button or select page in datascroller javascript is called. Javascript is used for move popup to center of browser visible area. All work fine, except popup shadow is stay for previous panel position when popup is already moved.</p>
  
  <p>Button code:</p>
  
  <pre><code>&lt;a4j:commandButton id="searchButton"
      value="#{msg.search}"
      action="#{chAction.searchSegments}"
      styleClass="richButton"
      render="clientCategoryCandidateTable"
      oncomplete="centerPanel();" /&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>function centerPanel() {
      var modalPanel = #{rich:component('addToSegmentsPanel')};
      var windowWidth = document.documentElement.clientWidth;
      var windowHeight = document.documentElement.clientHeight;
      var popupWidth = modalPanel.width();
      var popupHeight = modalPanel.height();
      modalPanel.setLeft(Math.max(0, (windowWidth-popupWidth)/2));
      modalPanel.setTop(Math.max(0, (windowHeight-popupHeight)/2));
  };
  </code></pre>
  
  <p>I have tried different version of javascript, but with same side effect:</p>
  
  <pre><code>function centerPopup() {
      var popup = #{rich:component('addToSegmentsPanel')};
      popup.moveTo(Math.max(0, (window.innerWidth-popup.width())/2),
                   Math.max(0, (window.innerHeight-popup.height())/2));
  };
  </code></pre>
  
  <p>Screen shots:
  <img src="https://i.stack.imgur.com/QSox8.png" alt="Popup before call javascript">
  <img src="https://i.stack.imgur.com/wQgVK.png" alt="Popup after call javascript"></p>
  
  <p>Thanks for any help or comments.</p>