EasyUI Forum
September 16, 2025, 11:52:25 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Closing Modal Window with Escape Key  (Read 9118 times)
hbento
Newbie
*
Posts: 4


View Profile
« on: July 22, 2015, 06:02:30 AM »

Hi
How to setup the usual behaviour for the Escape Key when a modal easyui-window is opened?

I know the standard way, but is there any "data-option" that helps us setting the key for easyui-linkbutton? Like escape key or F1?
Logged
yamilbracho
Jr. Member
**
Posts: 64


View Profile Email
« Reply #1 on: July 22, 2015, 07:31:13 PM »

Maybe use bind of a keyboard event (keyup, keypress, etc), for example

$('#target').bind('keyup', function(event) {
 //event.keycode is the ascii code for the pressed key, so 27 is escape key...
      });

HTH,
Yamil
Logged
hbento
Newbie
*
Posts: 4


View Profile
« Reply #2 on: July 27, 2015, 08:27:20 AM »

Thanks
That I knew.
I believe it should there be some property more "easyui style".
Thanks Anyway
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!