mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02: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
b45a7e35aa
commit
81d63b6c12
@ -1274,13 +1274,14 @@ export class et2_vfsSelect extends et2_inputWidget
|
|||||||
});
|
});
|
||||||
document.body.appendChild(<HTMLElement><unknown>this.dialog);
|
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.et2 = self.dialog.template.widgetContainer;
|
||||||
app.vfsSelectUI.vfsSelectWidget = self;
|
app.vfsSelectUI.vfsSelectWidget = self;
|
||||||
app.vfsSelectUI.et2_ready(app.vfsSelectUI.et2, 'api.vfsSelectUI');
|
app.vfsSelectUI.et2_ready(app.vfsSelectUI.et2, 'api.vfsSelectUI');
|
||||||
app.vfsSelectUI.et2.getInstanceManager().app_obj['vfsSelectUI'] = app.vfsSelectUI;
|
app.vfsSelectUI.et2.getInstanceManager().app_obj['vfsSelectUI'] = app.vfsSelectUI;
|
||||||
});
|
})
|
||||||
this.dialog.addEventListener("close", () =>
|
this.dialog.addEventListener("close", () =>
|
||||||
{
|
{
|
||||||
self.dialog = undefined;
|
self.dialog = undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user