This commit is contained in:
Vanessa 2022-10-19 10:29:34 +08:00
parent fc9df791e2
commit b64e17242c

View file

@ -414,7 +414,8 @@ export const resizeDrag = () => {
const dragElement = document.getElementById("drag"); const dragElement = document.getElementById("drag");
const width = dragElement.clientWidth; const width = dragElement.clientWidth;
const left = dragElement.getBoundingClientRect().left; const left = dragElement.getBoundingClientRect().left;
const right = document.querySelector("#windowControls").clientWidth + document.querySelector("#barSearch").clientWidth * 4; const windowWidth = document.querySelector("#windowControls").clientWidth;
const right = (windowWidth ? windowWidth : 5) + document.querySelector("#barSearch").clientWidth * 4;
if (left > right && left - right < width) { if (left > right && left - right < width) {
dragElement.style.paddingRight = (left - right) + "px"; dragElement.style.paddingRight = (left - right) + "px";
} else if (left < right && right - left < width) { } else if (left < right && right - left < width) {