Prevent current_editing_chunk from being a non-chunk element

This commit is contained in:
Gnome Ann 2021-08-24 11:14:18 -04:00
parent f0962155b8
commit 7059c18f70
1 changed files with 3 additions and 1 deletions

View File

@ -622,7 +622,9 @@ function setadventure(state) {
function autofocus(event) {
if(connected) {
current_editing_chunk = event.target;
if(event.target.tagName == "CHUNK") {
current_editing_chunk = event.target;
}
event.target.focus();
} else {
event.preventDefault();