Merge branch 'MDL-68436' of https://github.com/timhunt/moodle
authorJun Pataleta <jun@moodle.com>
Tue, 16 Jun 2020 06:38:44 +0000 (14:38 +0800)
committerJun Pataleta <jun@moodle.com>
Tue, 16 Jun 2020 06:38:44 +0000 (14:38 +0800)
lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-debug.js
lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-min.js
lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button.js
lib/editor/atto/plugins/recordrtc/yui/src/button/js/button.js

index 3f62f9d..e6fd0f4 100644 (file)
Binary files a/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-debug.js and b/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-debug.js differ
index 1e16ae0..013087c 100644 (file)
Binary files a/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-min.js and b/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button-min.js differ
index 3f62f9d..e6fd0f4 100644 (file)
Binary files a/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button.js and b/lib/editor/atto/plugins/recordrtc/yui/build/moodle-atto_recordrtc-button/moodle-atto_recordrtc-button.js differ
index 3ffa677..bba8d70 100644 (file)
@@ -116,12 +116,12 @@ Y.namespace('M.atto_recordrtc').Button = Y.Base.create('button', Y.M.editor_atto
                 focusAfterHide: null
             });
 
-            // If dialogue is closed during recording, do the following.
             dialogue.after('visibleChange', function() {
                 var closed = !dialogue.get('visible'),
                     m = M.atto_recordrtc.commonmodule;
 
                 if (closed) {
+                    // If dialogue is closed during recording, do the following.
                     window.clearInterval(m.countdownTicker);
 
                     if (m.mediaRecorder && m.mediaRecorder.state !== 'inactive') {
@@ -135,9 +135,14 @@ Y.namespace('M.atto_recordrtc').Button = Y.Base.create('button', Y.M.editor_atto
                             }
                         });
                     }
+
+                    // Because the player uses ids to identify things (this should be fixed)
+                    // we must make sure the dialogue contents only exist once in the DOM.
+                    // Therefore, when a dialogue is closed, we must remove its contents.
+                    this.getDialogue().set('bodyContent', '');
                 }
 
-            });
+            }, this);
 
             dialogue.on('click', function() {
                 this.centered();