[FIX] web_editor: fix duplicated pasted image summernote
Issue
- Windows > Chrome or Firefox
- Any chatter > Open full screen
- Paste any image
The image is pasted twice
Cause
Summernote adds the image but
the browser event adds it too
Solution
I applied the fix that summernote did
summernote/summernote/commit/6e432941af17c5fee0877d9ff54b6ace65fbdb4b
OPW-2267712
closes odoo/odoo#52532
X-original-commit: 2b4b2ce8660326b1cb53b5624690718b89aaceda
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
This commit is contained in:
@@ -27,6 +27,7 @@ define([
|
||||
var item = list.head(clipboardData.items);
|
||||
if (item.kind === 'file' && item.type.indexOf('image/') !== -1) {
|
||||
handler.insertImages(layoutInfo, [item.getAsFile()]);
|
||||
event.preventDefault();
|
||||
}
|
||||
handler.invoke('editor.afterCommand', $editable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user