diff options
| author | Antoine Guenet <age@odoo.com> | 2019-02-19 09:56:32 +0000 |
|---|---|---|
| committer | Antoine Guenet <age@odoo.com> | 2019-02-19 09:56:32 +0000 |
| commit | 6c38ed2f8d8a4e072157ad074a0ce1ec79596a05 (patch) | |
| tree | d7f17f0b2ec0cf24b71494b095fa7ab357afef43 /addons/web_editor/static/src/js | |
| parent | 496d7fad747b605019c143384eaa6f2f61cbc29f (diff) | |
[FIX] web_editor: open the link modal on dblclick button descendent
The link modal only opened on double-click directly on an anchor,
meaning that double-clicking text in a span node within the button (as
is the case in the call-to-action snippet for instance) wouldn't open
the modal.
Now it opens as long as we have an ancestor that is an anchor, unless
the double-click occurs on a media (eg: a pictogram), in which case it
should open the media's modal.
closes odoo/odoo#31229
Diffstat (limited to 'addons/web_editor/static/src/js')
| -rw-r--r-- | addons/web_editor/static/src/js/wysiwyg/plugin/link.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/wysiwyg/plugin/link.js b/addons/web_editor/static/src/js/wysiwyg/plugin/link.js index e04f3e9d340..89ec8de8887 100644 --- a/addons/web_editor/static/src/js/wysiwyg/plugin/link.js +++ b/addons/web_editor/static/src/js/wysiwyg/plugin/link.js @@ -259,7 +259,7 @@ var LinkPlugin = Plugins.linkDialog.extend({ * @param {jQueryEvent} e */ _onDblclick: function (e) { - if (dom.isAnchor(e.target)) { + if (dom.ancestor(e.target, dom.isAnchor) && !dom.isMedia(e.target)) { this.show(); } }, |
