I am using Primefaces 6.2.
My problem is when I use autoComplete with dropDown=true
and scrollHeight
. Window close after I click on scroll bar. It works fine when I just use wheel on my mouse.
<p:autoComplete id="agendaSelect" scrollHeight="100" completeMethod="#{agendaAutoCompleteView.completeAgenda}" dropdown="true" itemValue="#{agenda}" var="agenda" itemLabel="#{agenda.displayName}" forceSelection="true" value="#{agendaAutoCompleteView.agenda}" converter="agendaConverter" required="true" requiredMessage="Pole Agenda musi byt vyplnene.">
<p:ajax event="itemSelect" update="bunkaSelect" listener="#{bunkaAutoCompleteView.bunkaListener}" />
</p:autoComplete>
As temporary fix until the Bug is fixed you might use the following JS-Code somewhere on your page (e.g. upon onload).
$('body').on('mousedown', '.ui-autocomplete-panel', function(event) { event.stopImmediatePropagation();});
This would prevent the event currently leading to misbehaviour (closing the panel) to be carried out. It will work also for partial Requests/Responses as the event would be applied to future DOM Elements of the same class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With