mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Fix vfsWidget sometimes gives "TypeError: Cannot read properties of null (reading 'get_value')"
It was trying to access template widgets before they had loaded. Fixed to wait until load is done.
This commit is contained in:
parent
9c4ae50735
commit
4856e97010
@ -1274,13 +1274,14 @@ export class et2_vfsSelect extends et2_inputWidget
|
||||
});
|
||||
document.body.appendChild(<HTMLElement><unknown>this.dialog);
|
||||
|
||||
this.dialog.addEventListener('open', function(e)
|
||||
// Wait for dialog to finish loading
|
||||
this.dialog.updateComplete.then(() =>
|
||||
{
|
||||
app.vfsSelectUI.et2 = self.dialog.template.widgetContainer;
|
||||
app.vfsSelectUI.vfsSelectWidget = self;
|
||||
app.vfsSelectUI.et2_ready(app.vfsSelectUI.et2, 'api.vfsSelectUI');
|
||||
app.vfsSelectUI.et2.getInstanceManager().app_obj['vfsSelectUI'] = app.vfsSelectUI;
|
||||
});
|
||||
})
|
||||
this.dialog.addEventListener("close", () =>
|
||||
{
|
||||
self.dialog = undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user