Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-12653

rich:autocomplete needs two clicks to hide popup

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.1.0.Final, 4.3.2
    • Fix Version/s: 4.5.13
    • Component/s: compatibility, component
    • Labels:
    • Environment:

      Internet Explorer 9

    • Steps to Reproduce:
      Hide

      Can be reproduced in Metamer with IE 10/11.

      1. deploy Metamer and open http://127.0.0.1:8080/metamer/faces/components/richAutocomplete/autocomplete.xhtml
      2. set @onclick to RichFaces.component('form:autocomplete').showPopup();
      3. set @showButton to true
      4. click on the button in autocomplete
      5. click outside
        • expected: the suggestions popup will hide
        • have: need another click to hide the suggestions popup
      Show
      Can be reproduced in Metamer with IE 10/11. deploy Metamer and open http://127.0.0.1:8080/metamer/faces/components/richAutocomplete/autocomplete.xhtml set @onclick to RichFaces.component('form:autocomplete').showPopup(); set @showButton to true click on the button in autocomplete click outside expected: the suggestions popup will hide have: need another click to hide the suggestions popup
    • Workaround Description:
      Hide

      Add the following code to your page:

      jQuery(document).ready(function () {
                jQuery('.rf-au-fld-btn').click(function(e) {
                          jQuery(e.target).focus();
                }); 
      });
      
      Show
      Add the following code to your page: jQuery(document).ready(function () { jQuery( '.rf-au-fld-btn' ).click(function(e) { jQuery(e.target).focus(); }); });

      Description

      In Internet Explorer 9 (did not test other versions) when an autocomplete popup is opened by clicking on the arrow button, it needs two clicks to close it.

      This can be reproduced with the following code:

      <?xml version='1.0' encoding='UTF-8' ?>
      <ui:composition xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
      	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:rich="http://richfaces.org/rich"
      	xmlns:fn="http://java.sun.com/jsp/jstl/functions">
      
      	<f:view>
      		<h:head></h:head>
      		<h:body>
      			<rich:autocomplete mode="client" minChars="0" autofill="false" showButton="true"
      				autocompleteList="#{fn:split('Test 1, Test 2, Test 3', ',')}" />
      		</h:body>
      	</f:view>
      </ui:composition>
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                michpetrov Michal Petrov
                Reporter:
                sandro.braendli Sandro Brändli
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: