mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-15 19:20:47 +01:00
Fix double-bound file drop handler
Fixes double-submit after dropping a second file. Noticed in mail compose, but probably affects everywhere file widget was used to upload
This commit is contained in:
parent
8d0b1b0234
commit
fe2f36d52f
@ -547,6 +547,21 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
|
||||
destroy()
|
||||
{
|
||||
// Not really needed, use the disconnectedCallback() and let the browser handle it
|
||||
|
||||
// Call the destructor of all children so any legacy widgets get destroyed
|
||||
for(let i = this.getChildren().length - 1; i >= 0; i--)
|
||||
{
|
||||
this.getChildren()[i].destroy();
|
||||
}
|
||||
|
||||
// Free the array managers if they belong to this widget
|
||||
for(let key in this._mgrs)
|
||||
{
|
||||
if(this._mgrs[key] && this._mgrs[key].owner == this)
|
||||
{
|
||||
delete this._mgrs[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
isInTree() : boolean
|
||||
|
@ -298,7 +298,7 @@ export class et2_file extends et2_inputWidget
|
||||
let drop_target = widget && widget.getDOMNode() || document.getElementById(this.options.drop_target);
|
||||
if(drop_target)
|
||||
{
|
||||
this.resumable.unAssignDrop(drop_target);
|
||||
this.resumable.unAssignDrop([drop_target]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user