Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…into MOODLE_24_STABLE
  • Loading branch information...
commit 47795b21266953ef30bafa6de8d4c39839c51759 2 parents 21126fc + d2e3607
@samhemelryk samhemelryk authored
View
5 course/yui/toolboxes/toolboxes.js
@@ -558,8 +558,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);
}
});
View
2  lib/yui/chooserdialogue/chooserdialogue.js
@@ -144,7 +144,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
Please sign in to comment.
Something went wrong with that request. Please try again.