Reputation: 123
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>
Upvotes: 12
Views: 3311
Reputation: 283
Able to fix this by adding below class.
.ui-corner-all{
padding-left:1px !important;
padding-right:1px !important;
}
This is PF generic class, so you may need to check your other alignments.
Upvotes: 1
Reputation: 528
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.
Upvotes: 18