mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
修复拖动聊天图标容易中断问题 (#1194)
This commit is contained in:
@@ -76,7 +76,8 @@ function embedChatbot() {
|
||||
|
||||
chatBtnDown = true;
|
||||
});
|
||||
ChatBtn.addEventListener('mousemove', (e) => {
|
||||
|
||||
window.addEventListener('mousemove', (e) => {
|
||||
e.stopPropagation();
|
||||
if (!canDrag || !chatBtnDown) return;
|
||||
|
||||
@@ -86,12 +87,8 @@ function embedChatbot() {
|
||||
|
||||
ChatBtn.style.transform = `translate3d(${transformX}px, ${transformY}px, 0)`;
|
||||
});
|
||||
ChatBtn.addEventListener('mouseup', (e) => {
|
||||
chatBtnDragged = false;
|
||||
chatBtnDown = false;
|
||||
});
|
||||
|
||||
window.addEventListener('mouseup', (e) => {
|
||||
chatBtnDragged = false;
|
||||
chatBtnDown = false;
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user