Skip to content

Commit

Permalink
🚧 Fix floating icon can not be clicked. (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
tolerious authored Aug 30, 2024
1 parent 968545d commit 423637b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ assignees: tolerious
**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behaviour:
**Reproduce**
Steps to reproduce the behavior:
1.

**Expected behaviour**
**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/general/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ function addMouseDownEvent() {
mouseX >= floatingPanelContainerRect.left &&
mouseX <= floatingPanelContainerRect.right &&
mouseY >= floatingPanelContainerRect.top &&
mouseY <= floatingPanelContainerRect.bottom
mouseY <= floatingPanelContainerRect.bottom &&
event.target.id === translationFloatingPanelShadowRootId
) {
event.stopPropagation();
event.preventDefault();
Expand Down Expand Up @@ -303,6 +304,7 @@ function showTranslationFloatingPanelTemporary() {
floatingPanel.style.top = 0;
floatingPanel.style.left = 0;
floatingPanel.style.boxShadow = "none";
floatingPanel.style.zIndex = 1;
}

// source=selection,说明点击的是floating icon
Expand Down

0 comments on commit 423637b

Please sign in to comment.