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:
Thijs Wenker 2019-03-14 01:08:11 +01:00
parent 5e09103d9f
commit aeb56ff22a
2 changed files with 9 additions and 2 deletions

View file

@ -459,7 +459,7 @@ function loaded() {
isRenameFieldBeingMoved = true;
document.body.appendChild(elRenameInput);
// keep the focus
elRenameInput.select();
elRenameInput.focus();
}
}
@ -475,7 +475,7 @@ function loaded() {
elCell.innerHTML = "";
elCell.appendChild(elRenameInput);
// keep the focus
elRenameInput.select();
elRenameInput.focus();
isRenameFieldBeingMoved = false;
}

View file

@ -3325,6 +3325,13 @@ function loaded() {
}
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;
// the event bridge and json parsing handle our avatar id string differently.