fix: 点击背景图时取消输入框选中状态

This commit is contained in:
2026-05-15 15:16:28 +08:00
parent f090f18a9d
commit be00d6e3a9

View File

@@ -1391,6 +1391,21 @@
// 点击背景图显示工具栏
bgImage.addEventListener('click', (e) => {
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();
isInteractingWithBgImage = true;