fix enter caught on dismissed dialog element
This commit is contained in:
parent
a38add0945
commit
d20cd7f808
1 changed files with 3 additions and 2 deletions
|
|
@ -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();
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue