This commit is contained in:
2024-05-24 09:48:33 +02:00
parent 871f8e3a61
commit 106dac39e6
20 changed files with 219 additions and 49 deletions
+2 -2
View File
@@ -118,14 +118,14 @@
});
document.addEventListener('keydown', function (event) {
if (event.key === 'Shift' && document.activeElement.id !== 'chat-input-textarea' && document.getElementById('models-creation').classList.contains('is-hidden')) {
if (event.key === 'Shift' && document.activeElement.id !== 'chat-input-textarea' && document.getElementById('models-creation').classList.contains('is-hidden') && document.getElementById('models-dropdown').classList.contains('is-active')) {
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' && document.getElementById('models-creation').classList.contains('is-hidden')) {
if (event.key === 'Shift' && document.activeElement.id !== 'chat-input-textarea' && document.getElementById('models-creation').classList.contains('is-hidden') && document.getElementById('models-dropdown').classList.contains('is-active')) {
document.body.classList.remove('shift-pressed');
lastSelectedIndex = null;