[FIX] web_editor: fix drag and drop tooltip
Since [commit 1], the tooltip that appears when a user clicks on a snippet (instead of dragging it) is no longer displayed. The reason is because [commit 1] replaced jQueryUI with Odoo's own code and that triggers `preventDefault` on the `pointerdown` event which then cancels `mousedown` and thus prevents the mousedown call back that displays the tooltip. To fix this, this commit replaces mousedown and mouseup events on the `SnippetsMenu` by pointerdown and pointerup. [commit 1]: https://github.com/odoo/odoo/commit/7594d71ca8610d5947e80f325ccb57abc23c2c76 task-3582562 closes odoo/odoo#141026 Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
This commit is contained in:
@@ -1744,8 +1744,8 @@ var SnippetsMenu = Widget.extend({
|
||||
'click .o_we_invisible_entry': '_onInvisibleEntryClick',
|
||||
'click #snippet_custom .o_rename_btn': '_onRenameBtnClick',
|
||||
'click #snippet_custom .o_delete_btn': '_onDeleteBtnClick',
|
||||
'mousedown': '_onMouseDown',
|
||||
'mouseup': '_onMouseUp',
|
||||
'pointerdown': '_onMouseDown',
|
||||
'pointerup': '_onMouseUp',
|
||||
'input .o_snippet_search_filter_input': '_onSnippetSearchInput',
|
||||
'click .o_snippet_search_filter_reset': '_onSnippetSearchResetClick',
|
||||
'click .o_we_website_top_actions button[data-action=save]': '_onSaveRequest',
|
||||
|
||||
Reference in New Issue
Block a user