Merge branch 'MDL-64678-master' of git://github.com/damyon/moodle

This commit is contained in:
Adrian Greeve 2019-03-05 13:51:33 +08:00
commit 40f289f362
4 changed files with 22 additions and 10 deletions

View File

@ -4779,7 +4779,7 @@ EDITOR.prototype = {
*/
disable_touch_scroll: function() {
if (this.event_listener_options_supported()) {
document.addEventListener('touchmove', this.stop_touch_scroll, {passive: false});
document.addEventListener('touchmove', this.stop_touch_scroll.bind(this), {passive: false});
}
},
@ -4788,8 +4788,12 @@ EDITOR.prototype = {
* @param {Object} e
*/
stop_touch_scroll: function(e) {
e.stopPropagation();
e.preventDefault();
var drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
if (drawingregion.contains(e.target)) {
e.stopPropagation();
e.preventDefault();
}
}
};

View File

@ -4779,7 +4779,7 @@ EDITOR.prototype = {
*/
disable_touch_scroll: function() {
if (this.event_listener_options_supported()) {
document.addEventListener('touchmove', this.stop_touch_scroll, {passive: false});
document.addEventListener('touchmove', this.stop_touch_scroll.bind(this), {passive: false});
}
},
@ -4788,8 +4788,12 @@ EDITOR.prototype = {
* @param {Object} e
*/
stop_touch_scroll: function(e) {
e.stopPropagation();
e.preventDefault();
var drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
if (drawingregion.contains(e.target)) {
e.stopPropagation();
e.preventDefault();
}
}
};

View File

@ -1503,7 +1503,7 @@ EDITOR.prototype = {
*/
disable_touch_scroll: function() {
if (this.event_listener_options_supported()) {
document.addEventListener('touchmove', this.stop_touch_scroll, {passive: false});
document.addEventListener('touchmove', this.stop_touch_scroll.bind(this), {passive: false});
}
},
@ -1512,8 +1512,12 @@ EDITOR.prototype = {
* @param {Object} e
*/
stop_touch_scroll: function(e) {
e.stopPropagation();
e.preventDefault();
var drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
if (drawingregion.contains(e.target)) {
e.stopPropagation();
e.preventDefault();
}
}
};