【发布时间】:2016-01-22 11:37:40
【问题描述】:
我有一个关于 html 输入标签或 primefaces p:input 的问题。 为什么光标总是自动跳入输入字段。我的页面高度很高,因此您需要向下滚动。输入字段位于页面末尾,光标会自动跳转(加载)到页面末尾进入输入字段。我怎样才能避免这种自动跳跃?
<h:form id="form">
<p:commandButton oncomplete="PF('dlgG').show();" value="Open"
id="button" update="dialog" partialSubmit="true" />
<p:dialog appendToBody="true" appendTo="@(body)" modal="true"
id="dialog" resizable="false" closeOnEscape="true" widgetVar="dlgG"
showEffect="drop" hideEffect="drop">
<div
style="width: 90%; height: 100px; background: black; margin-bottom: 1000px;color:red;" id="demo"></div>
<p:inputTextarea autoResize="true" rows="3" cols="100"
value="#{auftragBean.comment}" id="inputBox" />
</p:dialog>
</h:form>
【问题讨论】:
标签: javascript html primefaces