fix: 点击背景图时取消输入框选中状态
This commit is contained in:
15
js/script.js
15
js/script.js
@@ -1391,6 +1391,21 @@
|
|||||||
// 点击背景图显示工具栏
|
// 点击背景图显示工具栏
|
||||||
bgImage.addEventListener('click', (e) => {
|
bgImage.addEventListener('click', (e) => {
|
||||||
if (!currentImage) return;
|
if (!currentImage) return;
|
||||||
|
|
||||||
|
// 取消输入框和层叠图的选中状态
|
||||||
|
if (editingInput) {
|
||||||
|
endEdit(editingInput);
|
||||||
|
}
|
||||||
|
if (selectedInput) {
|
||||||
|
selectedInput.classList.remove('selected');
|
||||||
|
selectedInput = null;
|
||||||
|
hidePositionInfo();
|
||||||
|
}
|
||||||
|
if (selectedOverlay) {
|
||||||
|
selectedOverlay.classList.remove('selected');
|
||||||
|
selectedOverlay = null;
|
||||||
|
}
|
||||||
|
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
isInteractingWithBgImage = true;
|
isInteractingWithBgImage = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user