fix: 补上 bgLayer.click 的输入框取消选中逻辑
This commit is contained in:
15
js/script.js
15
js/script.js
@@ -1432,6 +1432,21 @@
|
|||||||
|
|
||||||
bgLayer.addEventListener('click', (e) => {
|
bgLayer.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