Permalink
Browse files

Merge branch 'MDL-34671-m23' of git://github.com/andrewnicols/moodle …

…into MOODLE_23_STABLE
  • Loading branch information...
2 parents 04093db + 7efab51 commit 8108e113b34871128e9e9831f6ee9c8b9b3a381f Sam Hemelryk committed Jan 28, 2013
Showing with 4 additions and 3 deletions.
  1. +3 −2 course/yui/toolboxes/toolboxes.js
  2. +1 −1 lib/yui/chooserdialogue/chooserdialogue.js
@@ -557,8 +557,9 @@ YUI.add('moodle-course-toolboxes', function(Y) {
// Cancel the edit if we lose focus or the escape key is pressed
thisevent = editor.on('blur', cancel_edittitle);
listenevents.push(thisevent);
- thisevent = Y.one('document').on('keyup', function(e) {
- if (e.keyCode == 27) {
+ thisevent = Y.one('document').on('keydown', function(e) {
+ if (e.keyCode === 27) {
+ e.preventDefault();
cancel_edittitle(e);
}
});
@@ -143,7 +143,7 @@ YUI.add('moodle-core-chooserdialogue', function(Y) {
this.listenevents.push(thisevent);
// Grab global keyup events and handle them
- thisevent = Y.one('document').on('keyup', this.handle_key_press, this);
+ thisevent = Y.one('document').on('keydown', this.handle_key_press, this);
this.listenevents.push(thisevent);
// Add references to various elements we adjust

0 comments on commit 8108e11

Please sign in to comment.