This commit is contained in:
2024-05-22 17:48:43 +02:00
parent 1aa1968747
commit cae9dfa5fc
3 changed files with 8 additions and 11 deletions
+2 -2
View File
@@ -93,14 +93,14 @@
});
document.addEventListener('keydown', function (event) {
if (event.key === 'Shift') {
if (event.key === 'Shift' && document.activeElement.id !== 'chat-input-textarea' && document.getElementById('models-creation').classList.contains('is-hidden')) {
document.body.classList.add('shift-pressed');
}
});
document.addEventListener('keyup', function (event) {
// If Shift is press and id="chat-input-textarea" not focused
if (event.key === 'Shift' && document.activeElement.id !== 'chat-input-textarea') {
if (event.key === 'Shift' && document.activeElement.id !== 'chat-input-textarea' && document.getElementById('models-creation').classList.contains('is-hidden')) {
document.body.classList.remove('shift-pressed');
lastSelectedIndex = null;