forked from extern/egroupware
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
da1b1f6999
commit
e62cf4c2f7
@ -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