mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-01-16 10:30:57 +01:00
Improve story chunk blurring
This commit is contained in:
parent
2071daf335
commit
723e02d793
@ -633,7 +633,9 @@ function chunkOnKeyDown(event) {
|
|||||||
// Enter should submit the chunk changes, except when holding shift
|
// Enter should submit the chunk changes, except when holding shift
|
||||||
// Escape should also do it regardless of whether shift is held
|
// Escape should also do it regardless of whether shift is held
|
||||||
if(event.keyCode == 27 || (!event.shiftKey && event.keyCode == 13)) {
|
if(event.keyCode == 27 || (!event.shiftKey && event.keyCode == 13)) {
|
||||||
event.target.blur();
|
setTimeout(function () {
|
||||||
|
event.target.blur();
|
||||||
|
}, 5);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -669,9 +671,10 @@ function submitEditedChunk(event) {
|
|||||||
|
|
||||||
show([$('#curtain')]);
|
show([$('#curtain')]);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
document.activeElement.blur();
|
if(document.activeElement.tagName == "CHUNK") {
|
||||||
|
document.activeElement.blur();
|
||||||
|
}
|
||||||
}, 5);
|
}, 5);
|
||||||
document.activeElement.blur();
|
|
||||||
current_chunk_changed = false;
|
current_chunk_changed = false;
|
||||||
|
|
||||||
// Enter edit mode if we aren't already in edit mode
|
// Enter edit mode if we aren't already in edit mode
|
||||||
|
Loading…
Reference in New Issue
Block a user