mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-10-05 01:22:16 +02:00
Fix drag & drop error "Cannot read properties of undefined"
This commit is contained in:
parent
ee2be9702a
commit
40a7ef6e6b
@ -204,15 +204,20 @@ export class EgwDropActionImplementation implements EgwActionImplementation {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
unregisterAction: (_actionObjectInterface: any) => boolean = function (_aoi) {
|
unregisterAction : (_actionObjectInterface : any) => boolean = function(_aoi)
|
||||||
const node = _aoi.getDOMNode();
|
{
|
||||||
|
const node = _aoi.getDOMNode();
|
||||||
|
|
||||||
if (node) {
|
if(node)
|
||||||
node.classList.remove('et2dropzone');
|
{
|
||||||
}
|
node.classList.remove('et2dropzone');
|
||||||
|
}
|
||||||
// Unregister handlers
|
// Unregister handlers
|
||||||
_aoi.handlers[this.type]?.forEach(h => node.removeEventListener(h.type, h.listener));
|
if(_aoi.handlers)
|
||||||
delete _aoi.handlers[this.type];
|
{
|
||||||
|
_aoi.handlers[this.type]?.forEach(h => node.removeEventListener(h.type, h.listener));
|
||||||
|
delete _aoi.handlers[this.type];
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -309,8 +309,11 @@ export class EgwDragActionImplementation implements EgwActionImplementation {
|
|||||||
node.setAttribute('draggable', "false");
|
node.setAttribute('draggable', "false");
|
||||||
}
|
}
|
||||||
// Unregister handlers
|
// Unregister handlers
|
||||||
_aoi.handlers[this.type]?.forEach(h => node.removeEventListener(h.type, h.listener));
|
if(_aoi.handlers)
|
||||||
delete _aoi.handlers[this.type];
|
{
|
||||||
|
_aoi.handlers[this.type]?.forEach(h => node.removeEventListener(h.type, h.listener));
|
||||||
|
delete _aoi.handlers[this.type];
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user