From 6e7f478402c78734240947a2fe5d135643e0f568 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Mon, 4 Jun 2018 12:31:04 -0400 Subject: [PATCH] Allow scrolling after insert/edit image in Studio The scroll lock class `modal-open` is removed from the body when the EditImageModal is closed using the "Close" or "X" button, but not when the "Insert Image" button is clicked. The submit button handler now calls the `closeImageModal` handler too so that the `modal-open` class is removed after inserting or editing an image. --- common/lib/xmodule/xmodule/js/src/html/edit.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/js/src/html/edit.js b/common/lib/xmodule/xmodule/js/src/html/edit.js index 748faab31e..4945b8878e 100644 --- a/common/lib/xmodule/xmodule/js/src/html/edit.js +++ b/common/lib/xmodule/xmodule/js/src/html/edit.js @@ -1289,8 +1289,9 @@ HTMLEditingDescriptor.prototype.editImageSubmit = function(event) { if (event.detail) { - return this.saveImageFromModal(event.detail); + this.saveImageFromModal(event.detail); } + return this.closeImageModal(); }; HTMLEditingDescriptor.prototype.editLink = function(data) {