Comments (5)
Awesome, thanks for the quick turnaround! Was really excited about using this library caus it's great. Glad the solution didn't end up being too complicated.
from dockview.
Good news! I think I found a workaround. I noticed when getting stuck in drag mode, I could see the title of one of the panels very faintly, moving around with the mouse:
This made me think the entire panel element was being dragged. I added the following CSS rule and have been unable to recreate the bug since. Note that both selectors seem to be required, otherwise it occasionally reproduces, so I guess both of these elements are sometimes getting selected.
.split-view-container .view-container .view, .groupview {
user-select: none;
}
from dockview.
Realized that the previous CSS rule was breaking all text selection inside the panel, which is obviously not ideal. Worse, re-enabling user-select: auto
on any child element seemed to break the whole thing and the bug came back. Finally I figured out that it just needs to be applied to the drag handles themselves:
.split-view-container .sash-container .sash {
user-select: none;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE 10 and IE 11 */
}
This appears to fix the bug as well as preserve normal selection of panel content.
from dockview.
Thanks for the detailed description and the attempt to fix it too!
I just checked this out by adding a global drag listener to check what was actually being dragged here, something like:
document.addEventListener('dragStart', (e) => {
console.log('drag', e)
});
and yes it seems that the sash element is unintentionally entering a drag state occasionally as below. I think your analysis and fix is correct, great spot.
I will double-check a few things and aim to merge your PR and publish a fix version for this in the next day or two.
Thanks for finding the bug and the fix🙂
from dockview.
This is now merged and published as v1.7.2
from dockview.
Related Issues (20)
- Feature request: dropdown menu to handle overflow tabs
- Sonar Suggestions
- Gap between panels leads to some panels' size overflow HOT 6
- `api.toJSON()` and `api.fromJSON()` should be be renamed, as they use JS Objects and not JSON.
- setTitle issues HOT 1
- dockview-vue error Cannot read properties of null (reading 'appContext') HOT 1
- docs
- After all the groups in the branch are hidden, an error is reported when calling fromJSON() HOT 3
- Allow custom renderer for group header (or tabs container) HOT 1
- Initial width and height of a docker panel HOT 2
- bug:After the drag and drop, the size of the group was evenly distributed, and I want to maintain their original size as much as possible HOT 2
- When I was using this project, I encountered three tricky issues HOT 1
- [Released] Dockview 1.15.0 Iteration Plan
- How to set minimum and maximum panel sizes in DockView? HOT 1
- Panel and Group default sizes and bounding dimensions
- Dockview 1.16.0 Iteration Plan
- Nested views resize lag
- 1.15 removed types that are still valid HOT 1
- fix passing through options for opening single panel in a popot window HOT 1
- Offical support for Vanilla TypeScript
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockview.