我有一个 <h:inputText><p:commandButton>
一个接一个地排列在<p:scrollPanel>
里面.
滚动 Pane 内的内容是动态的,因此根据特定条件添加或删除内容,并动态添加滚动条。如果内容超过滚动 Pane 的大小,则添加滚动条。
问题是当我滚动滚动条时 <h:inputText>
随滚动条一起滚动,但不随滚动条一起滚动,这意味着它保持静态并且不会上下滚动。
这是我的代码
<h:inputText style="width:41%" value="#{xx.selectedid"/>
<p:commandButton value="WebPhone" id="pwebpne" style="margin-left:1em;width: auto; height: 20px;font-size:85%;valign:top" actionListener="#{xx.PhoneSearch}" oncomplete="window.open('#{xx.pUrl}', '_blank')"
rendered="#{xx.editflg == true"} async="false">
我已附上我的期望的屏幕截图,如下所示:
这似乎是一种浏览器问题,在 mozilla firefox 中同样可以正常工作,我使用的是发现问题的 IE 8。 如何解决问题。
最佳答案
我替换了<p:commandButton>
与 <h:commandButton>
按钮及其滚动。
关于javascript - <p :commandButton> not getting scrolled along with the <p:scrollPanel>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21255092/