summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/wysiwyg/plugin/media.js
diff options
context:
space:
mode:
authorGorash <chm@odoo.com>2019-03-06 12:33:36 +0000
committerGorash <chm@odoo.com>2019-03-06 12:33:36 +0000
commite797d7a3c3e5c4a42c8ea31da0fde2c13573038f (patch)
treeb7064e5cffaa6a85a6f857c54ae3a2af1b28fc29 /addons/web_editor/static/src/js/wysiwyg/plugin/media.js
parent03a217e47ef038083d5bd6031a7a55d5d86412a3 (diff)
[FIX] web_editor: wrong focus detection in the editor
Issue detected with tests in the branch that replace deferred by native Promise. Need to add isMedia to detect if the target is already a media when focus the editor. closes odoo/odoo#31632 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js/wysiwyg/plugin/media.js')
-rw-r--r--addons/web_editor/static/src/js/wysiwyg/plugin/media.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/wysiwyg/plugin/media.js b/addons/web_editor/static/src/js/wysiwyg/plugin/media.js
index e60cfbe8039..2cdfbe70cfe 100644
--- a/addons/web_editor/static/src/js/wysiwyg/plugin/media.js
+++ b/addons/web_editor/static/src/js/wysiwyg/plugin/media.js
@@ -86,7 +86,7 @@ var MediaPlugin = AbstractPlugin.extend({
* @param {Node} target
*/
update: function (target) {
- if (!target) {
+ if (!target || !dom.isMedia(target)) {
return;
}
if (!this.options.displayPopover(target)) {