Skip to content

Commit 582b50c

Browse files
Fixes issue: #4047 - circle closing when click on anywhere on the page (#4049)
Co-authored-by: Meet <[email protected]>
1 parent 672688f commit 582b50c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

js/activity.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,8 +1958,8 @@ class Activity {
19581958

19591959
that.stage.removeAllEventListeners("stagemousemove");
19601960
that.stage.on("stagemousemove", (event) => {
1961-
that.stageX = moveEvent.stageX;
1962-
that.stageY = moveEvent.stageY;
1961+
that.stageX = event.stageX;
1962+
that.stageY = event.stageY;
19631963

19641964
if (!that.moving) return;
19651965

js/piemenus.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3495,6 +3495,14 @@ const piemenuBlockContext = (block) => {
34953495
docById("contextWheelDiv").style.display = "none";
34963496
};
34973497

3498+
document.body.addEventListener("click", (event) => {
3499+
const wheelElement = document.getElementById("contextWheelDiv");
3500+
const displayStyle = window.getComputedStyle(wheelElement).display;
3501+
if (displayStyle === "block") {
3502+
wheelElement.style.display = "none";
3503+
}
3504+
});
3505+
34983506
if (
34993507
["customsample", "temperament1", "definemode", "show", "turtleshell", "action"].includes(
35003508
block.name

0 commit comments

Comments
 (0)