fix enter caught on dismissed dialog element

This commit is contained in:
Stewart Allen 2024-08-31 15:10:03 -04:00
commit d20cd7f808

View file

@ -1134,10 +1134,11 @@ const tool = {
return log('rename requires a single selection');
}
let onclick = onkeydown = (ev) => {
if (ev.code && ev.code !== 'Enter') {
let el = $('tempedit');
if (!el || (ev.code && ev.code !== 'Enter')) {
return;
}
model.rename( $('tempedit').value.trim() );
model.rename( el.value.trim() );
util.defer(selection.update);
api.modal.hide();
};