[FIX] mail: dropzone deactivate for text and user's avatar
Before this commit: Currently, in Discuss, the chat activates the drop zone when try to drag and drop any user's avatar (or any text). The same thing happens if we do it in the chat window or chatter. After this commit: The chat will not be activated drop zone if the drag is not actually a file/a document. Task-2590510 closes odoo/odoo#80464 X-original-commit: 0e2f46bc2cfd36dc3508a56601239c15e2301571 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
+5
-1
@@ -62,7 +62,11 @@ export function useDragVisibleDropZone() {
|
||||
* @param {DragEvent} ev
|
||||
*/
|
||||
function _onDragenterListener(ev) {
|
||||
if (dragCount === 0) {
|
||||
if (
|
||||
dragCount === 0 &&
|
||||
ev.dataTransfer &&
|
||||
ev.dataTransfer.types.includes('Files')
|
||||
) {
|
||||
isVisible.value = true;
|
||||
}
|
||||
dragCount++;
|
||||
|
||||
Reference in New Issue
Block a user