Fix UI selection when dragging pane borders
This commit is contained in:
parent
976b41cb83
commit
4b1d9dc851
|
|
@ -4522,6 +4522,7 @@ function splitPane(div, percent, horiz, newPane = undefined) {
|
||||||
if (event.target === event.currentTarget) {
|
if (event.target === event.currentTarget) {
|
||||||
if (event.button === 0) {
|
if (event.button === 0) {
|
||||||
// Left click
|
// Left click
|
||||||
|
event.preventDefault(); // Prevent text selection during drag
|
||||||
event.currentTarget.setAttribute("dragging", true);
|
event.currentTarget.setAttribute("dragging", true);
|
||||||
event.currentTarget.style.userSelect = "none";
|
event.currentTarget.style.userSelect = "none";
|
||||||
rootPane.style.userSelect = "none";
|
rootPane.style.userSelect = "none";
|
||||||
|
|
@ -4655,7 +4656,7 @@ function splitPane(div, percent, horiz, newPane = undefined) {
|
||||||
{ id: "ctx_option4", text: horiz ? "Join Right" : "Join Down" },
|
{ id: "ctx_option4", text: horiz ? "Join Right" : "Join Down" },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
menu.popup({ x: event.clientX, y: event.clientY });
|
await menu.popup();
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Right-click on the element");
|
console.log("Right-click on the element");
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ button {
|
||||||
}
|
}
|
||||||
.horizontal-grid:not(.panecontainer > .horizontal-grid),
|
.horizontal-grid:not(.panecontainer > .horizontal-grid),
|
||||||
.vertical-grid:not(.panecontainer > .vertical-grid) {
|
.vertical-grid:not(.panecontainer > .vertical-grid) {
|
||||||
gap: 3px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
.horizontal-grid {
|
.horizontal-grid {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue