-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Floating tab groups move in nested dockview #344
Comments
Nice find - thank you! I've taken a look into this and the explaination is something like... dockview dispatches most resize events through requestAnimationFrame calls for performance reasons. This means that the actual resize call doesn't necessarily happen immediately and in this case the callback isn't called until after the nested dockview has been unmounted from the DOM to make way for the newly focused panel. Since that element is no longer attached to the DOM when the internal resizing logic goes to measure this component it measures as zero in both dimensions and position causing the resetting of the floating panels position to the top left (0, 0). To fix this issue the resizing logic should check that the element it is measuring is actually still present in the DOM and if it is not skip the resize call. |
Thanks for the explanation! Stoked for this to be working. This is perhaps one of my favourite features of switching over to Dockview. Out of curiosity, anything on the roadmap to pull a tab out into a totally new browser window? |
Released in version |
Hey there @mathuo I've ran into an instance of this issue when applying Here's a video, not sure if you have any recommendations. Screen.Recording.2023-12-14.at.15.23.54.mov |
Any answer on @garyvh2 comment? I am seeing the same issue where when you use |
Hey. - can you expand on what exactly you are doing please. Slightly unsure where the |
In my case at least, we have a top level utility that works as a tab manager, each tab has an instance of Dockview, when the tab is not selected, the content gets applied |
ah ok - so in your case you are setting a |
I think is on a div on top of it, but yeah, not sure if there's a workaround to make sure size is preserved when display none is applied. |
nice, that makes more sense. I have a feeling it's probably something in the resizable.ts logic. I will need to check how this behaves with |
Much appreciated, Mathuo |
Describe the bug
I am using nested dockviews. I have one controlling a tab system, and within the tab there are workspaces with tab windows. When I pop a group out and position it, switch parent tabs, and come back, the floating group is moved to the top right corner.
To Reproduce
This issue can be reproduced directly on the nested dockview demo on the site here https://dockview.dev/docs/components/dockview#nested-dockviews.
Steps to reproduce the behavior:
Expected behavior
Floating tab groups should stay where they are placed.
Screenshots
Screen.Recording.2023-09-28.at.3.30.16.PM.mov
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: