mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:29:32 +02:00
EntityList -> re-focus the rename field rather then re-selecting the text fully
EntityProperties -> ignore selection updates when nothing is changed and window is focused
This commit is contained in:
parent
5e09103d9f
commit
aeb56ff22a
2 changed files with 9 additions and 2 deletions
|
@ -459,7 +459,7 @@ function loaded() {
|
||||||
isRenameFieldBeingMoved = true;
|
isRenameFieldBeingMoved = true;
|
||||||
document.body.appendChild(elRenameInput);
|
document.body.appendChild(elRenameInput);
|
||||||
// keep the focus
|
// keep the focus
|
||||||
elRenameInput.select();
|
elRenameInput.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -475,7 +475,7 @@ function loaded() {
|
||||||
elCell.innerHTML = "";
|
elCell.innerHTML = "";
|
||||||
elCell.appendChild(elRenameInput);
|
elCell.appendChild(elRenameInput);
|
||||||
// keep the focus
|
// keep the focus
|
||||||
elRenameInput.select();
|
elRenameInput.focus();
|
||||||
isRenameFieldBeingMoved = false;
|
isRenameFieldBeingMoved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3325,6 +3325,13 @@ function loaded() {
|
||||||
}
|
}
|
||||||
|
|
||||||
let hasSelectedEntityChanged = lastEntityID !== '"' + selectedEntityProperties.id + '"';
|
let hasSelectedEntityChanged = lastEntityID !== '"' + selectedEntityProperties.id + '"';
|
||||||
|
|
||||||
|
if (!hasSelectedEntityChanged && document.hasFocus()) {
|
||||||
|
// in case the selection has not changed and we still have focus on the properties page,
|
||||||
|
// we will ignore the event.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let doSelectElement = !hasSelectedEntityChanged;
|
let doSelectElement = !hasSelectedEntityChanged;
|
||||||
|
|
||||||
// the event bridge and json parsing handle our avatar id string differently.
|
// the event bridge and json parsing handle our avatar id string differently.
|
||||||
|
|
Loading…
Reference in a new issue