简体   繁体   English

rich:自动完成功能需要单击两次才能隐藏弹出窗口

[英]rich:autocomplete needs two clicks to hide popup

In Internet Explorer 9 when an autocomplete popup is opened by clicking on the arrow button, it needs two clicks outside it to close it. 在Internet Explorer 9中,通过单击箭头按钮打开自动完成弹出窗口时,需要在其外部单击两次以将其关闭。

This can be reproduced with the following code: 可以使用以下代码来复制它:

<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>

The problem is, that the handler for the blur event is not fired for the first click. 问题是,第一次单击时不会触发模糊事件的处理程序。

It seems to be a bug in RichFaces, so I filed a bug report . 它似乎是RichFaces中的错误,因此我提交了一个错误报告 As I don't think it will be fixed very soon and I can't upgrade to a newer version, I am looking for a workaround. 由于我认为不会很快解决该问题,并且无法升级到较新的版本,因此我正在寻找解决方法。

It works when I add the following code to my page: 当我将以下代码添加到页面时,它可以工作:

jQuery(document).ready(function () {
    jQuery('.rf-au-fld-btn').click(function(e) {
        jQuery(e.target).focus();
    }); 
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM