title: Primefaces selectOneMenu in dialog breaks when scrolling
body: <p>When I use p:selectOneMenu in p:dialog, selectOneMenu's panel is detached from selectOneMenu when scrolling. I found a few similar posts, but none of those solutions work:</p>
  <p><a href="https://stackoverflow.com/questions/26228872/pselectonemenu-dropdown-part-scrolls-and-does-not-stay-in-position/">p:selectOneMenu dropdown part scrolls and does not stay in position</a></p>
  <p><a href="https://stackoverflow.com/questions/15286454/pselectonemenu-dropdown-not-attached-to-the-component-inside-a-dialog">p:selectOneMenu dropdown not attached to the component inside a dialog</a></p>
  <p><a href="https://forum.primefaces.org/viewtopic.php?f=3&amp;t=14905" rel="nofollow noreferrer">SelectOneMenu panel scrolls with the mouse wheel</a></p>
  <p>Basically all the proposed solutions use <code>appendTo=&quot;@this&quot;</code>, but it doesn't work in my case. I use PF 6.2.27.</p>
  <p>Here's a part of my dialog:</p>
  <pre><code>&lt;ui:composition xmlns:ui=&quot;http://java.sun.com/jsf/facelets&quot; xmlns:f=&quot;http://java.sun.com/jsf/core&quot; xmlns:h=&quot;http://java.sun.com/jsf/html&quot; xmlns:portlet=&quot;http://java.sun.com/portlet_2_0&quot;
  xmlns:p=&quot;http://primefaces.org/ui&quot;&gt;
  &lt;p:dialog id=&quot;dlgTest&quot; widgetVar=&quot;dlgTestWidget&quot; header=&quot;My dialog&quot; closeOnEscape=&quot;true&quot; modal=&quot;true&quot; resizable=&quot;false&quot;
       width=&quot;1000&quot; height=&quot;800&quot;&gt;
  
  
      &lt;p:panelGrid id=&quot;pnlData&quot; styleClass=&quot;common-panel-grid&quot;&gt;
          &lt;p:row&gt;
              &lt;p:column&gt;
                  &lt;p:fieldset legend=&quot;HEADER&quot; toggleable=&quot;false&quot;&gt;
                      &lt;h:panelGrid id=&quot;pgUseCase&quot; &gt;
                          &lt;p:row&gt;
                              ...
                          &lt;/p:row&gt;
                          &lt;p:row&gt;
                              &lt;p:column colspan=&quot;2&quot;&gt;
                                  &lt;p:selectOneMenu id=&quot;somServices&quot; value=&quot;#{bean.selectedService}&quot; effect=&quot;none&quot; disabled=&quot;#{not bean.serviceEnabled}&quot;
                                       converter=&quot;serviceConverter&quot; appendTo=&quot;@this&quot;&gt;
                                      &lt;f:selectItem itemLabel=&quot;&quot; itemValue=&quot;#{null}&quot; noSelectionOption=&quot;true&quot; /&gt;
                                      &lt;f:selectItems var=&quot;item&quot; value=&quot;#{bean.serviceList}&quot; itemLabel=&quot;#{item.name}&quot; itemValue=&quot;#{item}&quot; /&gt;
                                  &lt;/p:selectOneMenu&gt;
                              &lt;/p:column&gt;
                          &lt;/p:row&gt;
                      &lt;/h:panelGrid&gt;
                  &lt;/p:fieldset&gt;
              &lt;/p:column&gt;
          &lt;/p:row&gt;
      &lt;/p:panelGrid&gt;
  &lt;/p:dialog&gt;
  </code></pre>
  <p>&lt;/ui:composition&gt;</p>
  <p>Does anyone have some other solution to this problem?</p>