Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to close rich:popupPanel on press of Esc key?

How to close rich:popupPanel on press of Esc key?

how to make it work for hotkeys in keyboard?

like image 965
Mahesh Kumar Avatar asked Oct 17 '25 15:10

Mahesh Kumar


1 Answers

I would try the following:

   <rich:hotKey key="Esc">
        <rich:componentControl target="popupId" operation="hide" />
   </rich:hotKey>

   <rich:popupPanel id="popupId">
      ...
   </rich:popupPanel>

More info in <rich:hotKey> documentation.

like image 122
dcernahoschi Avatar answered Oct 22 '25 06:10

dcernahoschi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!