4 Replies Latest reply on Feb 27, 2013 7:36 AM by Teena Stanley

    <rich:popupPanel> does not close on escape key press

    Teena Stanley Newbie

      Hello there,

       

      I guess I am posting in the right forum.

      I'm using Richfaces 4.0.0.Final. I have to close the <rich:popupPanel> on press of Esc button. I have tried the jQuery hotkey plug in, however that didn't close the popup. Here is how I tried it:

       

      $(document).bind('keydown', 'Esc', function(){

       

                  $("#mypopupPanel").fadeOut();

              });

       

       

      I know about the <rich:hotKey>, but unfortunately that is not released part of Richfaces 4.0.0.Final.

      I'm wondering why the <rich:popupPanel> does not contain any of the 'onkey*' functions associated with it. The only functions it supports are 'onmask* '. I am able to close the popup onclick, onmaskclick etc.

      If anybody has a work around for this (other than upgrading Richfaces), please let me know.

       

      Another question: Is it mandatory to wrap the <rich:popupPanel> with <a4j:form> ( In the jboss.org tutorial, I see the popup is always wrapped.)

      http://docs.jboss.org/richfaces/latest_4_0_X/Component_Reference/en-US/html/chap-Component_Reference-Panels.html#sect-Component_Reference-Panels-richpopupPanel

       

      Thank you,

      Teena