You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a simple check like if (this.isAttached) doesn't seem to fix the problem, and it's very strange that an onAfterAttach handler is running but the widget claims that it is not attached.
Steps to Reproduce:
Start the application (browser mode)
Check the console
Observe a number of Host is not attached errors logged.
Which is basically the same as Widget.detach and Widget.attach, except it doesn't check for whether the widget can be attached / detached as far as Phosphor is concerned. It seems like that probably points to areas where we're doing things that our widgets don't expect to be done.
Bug Description:
Recently I have been seeing a number of messages like this in my console:
Many have to do with code introduced in #9935
theia/packages/core/src/browser/view-container.ts
Line 931 in 16f3309
But at least one (the one in the screenshot above) points here:
theia/packages/core/src/browser/tree/tree-widget.tsx
Line 1054 in 16f3309
Which predates #9935 and probably wasn't affected by it (🤞).
What's happening in that somehow, when the
onAfterAttach
handlers are run, the widget'snode
is not contained indocument.body
And that triggers this error in Phosphor:
https://github.com/phosphorjs/phosphor/blob/9f5e11025b62d2c4a6fb59e2681ae1ed323dcde4/packages/widgets/src/widget.ts#L1003-L1005
Adding a simple check like
if (this.isAttached)
doesn't seem to fix the problem, and it's very strange that anonAfterAttach
handler is running but the widget claims that it is not attached.Steps to Reproduce:
Host is not attached
errors logged.Additional Information
The text was updated successfully, but these errors were encountered: