0

我已经在我的页面上插入了一个具有非常基本设置的 Primefaces Slider,问题是一旦我点击它的按钮,它就不会停止用鼠标移动。鼠标指针在页面中的哪个位置无关紧要。Slider 按钮跟随鼠标位置向右或向左移动。有没有人知道如何解决这个问题?

<h:outputLabel styleClass="form-label-top-right" for="area">Area:
<h:outputText id="output" value="#{formbean.selectedArea}"/> Km
<h:inputHidden id="area" value="#{formbean.selectedArea}" />
<p:slider animate="true" display="output" minValue="0" maxValue="15" step="3" id="areaSlider" for="area" style="margin-top:6px; cursor: pointer" />
</h:outputLabel>
4

2 回答 2

1

我认为这是您使用 h:outputLabel 包含这些其他标签的方式,不允许 mouseup 事件冒泡。使用 ah:panelGrid 与四列代替。

例如:

<h:panelGrid columns="4">
    <h:outputLabel styleClass="form-label-top-right" for="output" value="Area:" />
    <h:panelGroup>
        <h:outputText id="output" value="#{formbean.selectedArea}"/>
        <h:outputText value="Km"/>
    </h:panelGroup>

        <h:inputHidden id="area" value="#{formbean.selectedArea}" />
        <p:slider animate="true" display="output" minValue="0" maxValue="15" step="3" id="areaSlider" for="area" style="margin-top:6px; cursor: pointer" />
</h:panelGrid>
于 2012-06-25T03:24:33.700 回答
0

问题已解决。导致问题的是 FireFox 的“FireQuery”插件。卸载那个

于 2012-06-26T19:18:58.350 回答