Merge branch 'MDL-45239-master-3' of git://github.com/andrewnicols/moodle

This commit is contained in:
Marina Glancy
2014-05-22 12:59:56 +08:00
8 changed files with 21 additions and 9 deletions
@@ -1024,7 +1024,7 @@ EditorSelection.prototype = {
}
// We can't be active if the editor doesn't have focus at the moment.
if (!document.activeElement || document.activeElement !== this.editor) {
if (!document.activeElement || Y.one(document.activeElement) !== this.editor) {
return false;
}
File diff suppressed because one or more lines are too long
@@ -1019,7 +1019,7 @@ EditorSelection.prototype = {
}
// We can't be active if the editor doesn't have focus at the moment.
if (!document.activeElement || document.activeElement !== this.editor) {
if (!document.activeElement || Y.one(document.activeElement) !== this.editor) {
return false;
}
@@ -751,7 +751,11 @@ EditorPluginButtons.prototype = {
return;
}
if (!this.get('host').isActive()) {
if (!(YUI.Env.UA.android || this.get('host').isActive())) {
// We must not focus for Android here, even if the editor is not active because the keyboard auto-completion
// changes the cursor position.
// If we save that change, then when we restore the change later we get put in the wrong place.
// Android is fine to save the selection without the editor being in focus.
this.get('host').focus();
}
File diff suppressed because one or more lines are too long
@@ -749,7 +749,11 @@ EditorPluginButtons.prototype = {
return;
}
if (!this.get('host').isActive()) {
if (!(YUI.Env.UA.android || this.get('host').isActive())) {
// We must not focus for Android here, even if the editor is not active because the keyboard auto-completion
// changes the cursor position.
// If we save that change, then when we restore the change later we get put in the wrong place.
// Android is fine to save the selection without the editor being in focus.
this.get('host').focus();
}
+5 -1
View File
@@ -602,7 +602,11 @@ EditorPluginButtons.prototype = {
return;
}
if (!this.get('host').isActive()) {
if (!(YUI.Env.UA.android || this.get('host').isActive())) {
// We must not focus for Android here, even if the editor is not active because the keyboard auto-completion
// changes the cursor position.
// If we save that change, then when we restore the change later we get put in the wrong place.
// Android is fine to save the selection without the editor being in focus.
this.get('host').focus();
}
+1 -1
View File
@@ -121,7 +121,7 @@ EditorSelection.prototype = {
}
// We can't be active if the editor doesn't have focus at the moment.
if (!document.activeElement || document.activeElement !== this.editor) {
if (!document.activeElement || Y.one(document.activeElement) !== this.editor) {
return false;
}