mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 08:40:58 +00:00
fix: chatlist
This commit is contained in:
parent
fc1a66ea76
commit
9f7ef209fa
@ -120,18 +120,31 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
document.addEventListener('keydown', onKeyDown);
|
const onFocus = () => {};
|
||||||
document.addEventListener('keyup', onKeyUp);
|
|
||||||
|
const onBlur = () => {
|
||||||
|
shiftKey = false;
|
||||||
|
selectedChatId = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addEventListener('keydown', onKeyDown);
|
||||||
|
window.addEventListener('keyup', onKeyUp);
|
||||||
|
|
||||||
window.addEventListener('touchstart', onTouchStart);
|
window.addEventListener('touchstart', onTouchStart);
|
||||||
window.addEventListener('touchend', onTouchEnd);
|
window.addEventListener('touchend', onTouchEnd);
|
||||||
|
|
||||||
|
window.addEventListener('focus', onFocus);
|
||||||
|
window.addEventListener('blur', onBlur);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener('keydown', onKeyDown);
|
window.removeEventListener('keydown', onKeyDown);
|
||||||
window.removeEventListener('keyup', onKeyUp);
|
window.removeEventListener('keyup', onKeyUp);
|
||||||
|
|
||||||
window.removeEventListener('touchstart', onTouchStart);
|
window.removeEventListener('touchstart', onTouchStart);
|
||||||
window.removeEventListener('touchend', onTouchEnd);
|
window.removeEventListener('touchend', onTouchEnd);
|
||||||
|
|
||||||
|
window.removeEventListener('focus', onFocus);
|
||||||
|
window.removeEventListener('blur', onBlur);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user