You need to sign in to do that
Don't have an account?

How can i close popup when i clicked on ESC button on keyboard in salesforce lightning
HI ,
How can i close popup when i click ESC button on Key boar in salesforce lightning .
Please provie me solution
Thank you
Surender reddy
How can i close popup when i click ESC button on Key boar in salesforce lightning .
Please provie me solution
Thank you
Surender reddy
Can you elaborate on your ask?Can you share a screenshot so we can understand better.Thanks
you must caugth the event fired and control the keyCode.
For the escape keyCode = 27 (https://keycode.info/)
For example assuming you are in a lwc, you can do something like that
and this the front end where you fire the event
The same can be applied for your need.
Let me know if I have solved your problem
My scenario When we open any Custom popup we need to close that popup if using ESC button in keyboard how we will do that functionality using slesforce lightning .
Thank you
Surener reddy
Hi Marzorati Claudio,
Can you provide me brief explanation how we need to use it will be hepl full for me
Thank you
Surender Reddy
here an example: https://developer.salesforce.com/docs/component-library/tools/playground/vQ70xGgH-/3/edit
Press ESC button when popup appear. This is what you asked.
The same could be done for Aura Component.
Claudio