Open aminya opened 3 years ago
Can you give more information about how often this happens? what exactly doesn't restore? reproducible conditions?
When I start an Atom session, I expect the terminal to start again if it was open. Similar to how Atom recovers the open text editors.
Seems to work fine for me. Do you have the Allow relaunching terminals on startup
setting checked?
Yes, I do have it checked. This is random though. Sometimes it works! I will try to get some reproduction steps.
This is what I mean. I need to close this and start a new one:
are there any errors in the console? Can you inspect the element and see why it is hidden (display: none
, height: 0
, etc.)?
It might be something that could be fixed by https://github.com/xtermjs/xterm.js/pull/3089
There are no errors. It just does not show anything. It is like an empty pane (like in #5)
There is no element to choose:
looks like your IntersectionObserver
never gets called. Try setting some log statements to log out entries in https://github.com/atom-ide-community/terminal/blob/master/src/element.ts#L64 so next time it happens we can get more information.
I wonder if this is something with the atom-community version of atom?
Sure. I can add the logs. I am using the latest nightly.
I had a terminal open in the bottom dock, I minimized it. Closed Atom, and opened it again. The pane was empty:
Not minimizing the terminal before closing fixes the issue:
How is entries.length equal to 0? That should not even be possible. Basically that says there was an intersection observed but no intersections.
That doesn't happen for me.
How can I get more information about entries
? This seems like an xterm thing. Let me see if I can debug into xterm
This doesn't have anything to do with xterm. This looks like an issue with your version of electron. or more specifically the version of chromium bundled with electron.
This is what happens when I try to debug inside the IntersectionObserver callback:
If I click keep it open:
IntersectionObserver is part of the browser (chromium). That is an issue with the browser, nothing we can change.
The only way we could fix it is use some other way to check for visibility using setTimeout and getBoundingClientRect
The issue is not still solved. You mentioned you can hack something using setTimeout
. Can you look into that? @UziTech
I'll take a look at it tomorrow. It will be hard for me to debug though because it doesn't happen to me. I still don't understand how it happens to you. I wonder if you have some package that polyfills IntersectionObserver incorrectly.
The biggest problem with polling with setTimeout is it is going to be a performance nightmare.
The basic idea is we will have to poll with setTimeout until the user opens the dock, which could be never.
If that hurts the performance we should do something else.
I don't think there is anything else to do. I think the best approach is for you to figure out why it doesn't work for you.
Terminal does not fully restore on restart if it had been minimized in the dock.
See https://github.com/atom-ide-community/terminal/issues/30#issuecomment-711109168