Fix splitter bad position when sidebar open#13511
Conversation
|
Fix for #11626 |
|
Looking forward to see this finalized. And, be sure to test the conditon when sidebar is open on the right |
a3f8979 to
31e6108
Compare
| - <tabpanels id="tabbrowser-tabpanels" flex="1" selectedIndex="0"/> | ||
| +#include zen-tabbrowser-elements.inc.xhtml | ||
| <tabpanels id="tabbrowser-tabpanels" flex="1" selectedIndex="0"/> | ||
| + <tabpanels id="tabbrowser-tabpanels" flex="1" selectedIndex="0"> |
There was a problem hiding this comment.
Pretty sure selectedIndex is used to fetch childs within the tab panel. Adding elements inside might mess that up
There was a problem hiding this comment.
I looked into this a bit. Every tab keeps track of the index of its panel in the tabpanels element, so the index of the panels is adjusted to be +1 because of the overlay wrapper being inserted first into the tabpanels element. For the splitter, it is always appended to the list of children of tabpanels, so this also doesn't affect the indices of the panels in tabpanels.
I've been testing around creating new tabs, removing tabs, joining and splitting tabs, and using glance, and I haven't encountered any issues.
I can look into another solution though if you're not happy with this!
There was a problem hiding this comment.
The logic that I was looking at is in toolkit/content/widgets/tabbox.js
There was a problem hiding this comment.
True, just not really comfortable with messing around firefox's internals. I guess it could be fine for now
mr-cheffy
left a comment
There was a problem hiding this comment.
Could you please run npm run lint:fix?
53ab0d9 to
e8b91eb
Compare
Done. Corrected some linting errors in ZenViewSplitter.mjs |
|
Does drag and dropping split views from the top handle work for you? It doesnt show me the preview |
Yeah it works but you're right that it doesn't show the preview. I'll look into this |
fa13cdc to
e20029a
Compare
e20029a to
8b37aec
Compare
8b37aec to
f497072
Compare
f497072 to
43652b9
Compare
| -moz-subtree-hidden-only-visually: 0; | ||
| z-index: 2; |
There was a problem hiding this comment.
Added these changes to ensure contents of zen-splitview-overlay is shown above the tabs. This fixes not seeing the zen-splitview-dropzone



zen-splitview-overlay.inc.xhtmlintotabpanelselement to handle correct drag-and-drop logic when sidebar is openzen-split-view-splitterdirectly intotabpanelselement for correct placement when sidebar is openzen-split-view-splitterto center intabpanelselementtranslateX: calc(-50%)to::beforestyles in order to properly center splitter