mirror of
https://github.com/zen-browser/desktop.git
synced 2026-07-12 11:59:32 +00:00
gh-14511: Prevent switching spaces when dragging outside (gh-14515)
fixed: https://github.com/zen-browser/desktop/issues/14511
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
#changeSpaceTimer = null;
|
||||
#isAnimatingTabMove = false;
|
||||
#firstHapticFeedbackPlayed = false;
|
||||
#lastDragOverTime = 0;
|
||||
|
||||
#dragOverSplit = {};
|
||||
|
||||
@@ -723,9 +724,11 @@
|
||||
const { isNearLeftEdge, isNearRightEdge } =
|
||||
this.#shouldSwitchSpace(event);
|
||||
if (isNearLeftEdge || isNearRightEdge) {
|
||||
if (!this.#changeSpaceTimer && !this.#isOutOfWindow) {
|
||||
this.#lastDragOverTime = Date.now();
|
||||
if (!this.#changeSpaceTimer) {
|
||||
this.#changeSpaceTimer = setTimeout(() => {
|
||||
if (this.#isOutOfWindow) {
|
||||
const timeSinceLastDragOver = Date.now() - this.#lastDragOverTime;
|
||||
if (timeSinceLastDragOver > 250) {
|
||||
return;
|
||||
}
|
||||
this.clearDragOverVisuals();
|
||||
|
||||
Reference in New Issue
Block a user