Catch Enter, Catch Escape
catchEnter: function(e) { if (e.keyCode == 13) { Event.stop(e); return true; } else return false; }, catchEsc: function(e) { if (e.keyCode == 27) { Event.stop(e); return true; } else return false; }
TextSnippets > winton > key
2741 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Winton Welsh http://stu.dicio.us
catchEnter: function(e) { if (e.keyCode == 13) { Event.stop(e); return true; } else return false; }, catchEsc: function(e) { if (e.keyCode == 27) { Event.stop(e); return true; } else return false; }