mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 07:42:23 +00:00
Keep Contact folded until both Cockpit left panels close, and keep focus in a renamed row
Opening Utilities while Data Layers is open no longer forgets that Contact was folded for the first, and closing one of them leaves Contact folded while the other is still open. Enter and Esc in a drawn shape's name keep focus in the field instead of dropping it to the page. The draw tool's destroy test now checks it stops following the board, and the Draw gate's amber-count comment sits on its function again.
This commit is contained in:
1 parent
345d5db593
commit
672a145254
7 files changed
+68
-15
No files matched your search
@@ -42,15 +42,16 @@ function onNameKey(row, event) {
|
||||
const input = event.currentTarget;
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
// Saved, and focus stays here: blurring would drop it to the page.
|
||||
commit(row, input);
|
||||
input.blur();
|
||||
input.select();
|
||||
} else if (event.key === 'Escape') {
|
||||
// Escape drops the draft before anything else, an open colour picker
|
||||
// included, and stays in the list: it must not leave Draw.
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
input.value = rowOf(row.id)?.name ?? row.name;
|
||||
input.blur();
|
||||
input.select();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user