Open ProLoser opened 9 years ago
I think the problem is when the bar isn't there and it gets added that causes a re-render which causes a scroll to the top. You should have an invisible (or empty) placeholder container for the bar that exists even if there are no breadcrumbs present.
You should have an invisible (or empty) placeholder container for the bar that exists even if there are no breadcrumbs present.
Just enable the Keep Breadcrumb Visible
setting ;).
FWIW, initially the breadcrumb wasn't using a flex display (which force a repaint when inserted) but was using an absolute positioning, and the issue at that time was that the tree-view wouldn't update its height and some items at the bottom couldn't be reached by scroll due to that. Hence the switch to a flex display, but now it can trigger a jump in the scrolling.
Still seems like it could easily be fixed by merely toggling visibility instead of DOM structure
Not sure that it'll change anything, but it's sure worth giving it a try.
After enabling flexbox https://github.com/atom/tree-view/pull/579 maybe the absolute positioning could be tried again?
But there would still be the problem that it might cover other packages. Keep Breadcrumb Visible
only?
@simurai I'll try with my local fix and see what's the better solution for that configuration.
Here's what I get with both atom/tree-view#578 and atom/tree-view#579 applied and still using a flex display for the breadcrumb:
I don't see any scrolling occuring in the tree-view except for the one I'm doing with the mouse. @ProLoser let me know if this is what you expect.
The whole visibility feature and when it decides a appear and/or update is very buggy. I really wished this worked.
It keeps jumping around as the bar appears and disappears or is it just explicitly scrolling on some event? It should only scroll to a folder if I click on the button.