-
Notifications
You must be signed in to change notification settings - Fork 17.4k
getBoundingClientRect called on undefined in TextEditorComponent sometimes #15341
Comments
Definitely reproducible by myself and others on steelbrain/linter-ui-default#355 Sometimes, not always, when closing tabs, that error is raised through the |
This is a private API but I'd still like to help out. I'm pretty confused because both of those refs should be defined after the editor is initially constructed and should never be nulled out. |
@as-cii Do you have any ideas on this one. As far as I can tell both the |
Prior to Atom 1.19.2 (specifically, before #15317), the |
I haven't been able to reproduce the error since updating |
@as-cii My best guess at this point is that linter-ui-default was requesting measurements when the text editor had been unmounted (we have some internal debounce logic) so in the latest update I've made sure not to ask for measurements if the editor is unmounted That seems to have fixed it for people so far, as for the Atom side, I think the text editor refs are removed when the editor is closed? A safeguard that throws an error with a proper message would be nice and helpful in debugging further cases like this |
From what I know about the |
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks! |
Continuing from steelbrain/linter-ui-default#355
What we know so far
pixelPositionForMouseEvent
core:confirm
,core:copy
etcscrollContainer
orlineTiles
is undefined in Text Editor when those are invoked and it's not handled in Atom internallyFirst seen on 1.19.0-beta0, still hitting on 1.19.0
My rough guess about what it could be (not dug deep into sources so might be very wrong):
The text was updated successfully, but these errors were encountered: