Merge pull request #15185 from thoys/fix/create/stopReselectionWhenFocussed

Case 21653: Fix User is not able to update input fields and scroll past selected object in Create Tools [master]
This commit is contained in:
Shannon Romano 2019-03-14 16:14:32 -07:00 committed by GitHub
commit 98eec6b74d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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.