Skip to content

Commit

Permalink
[SDK-719] fix: reverted force focus (#191)
Browse files Browse the repository at this point in the history
- added an extra condition to the fix I made in this PR
[SDK-704] feat: fix pasted text display issue #183
because it without it, the field becomes difficult to type in due to the constant refocusing
  • Loading branch information
HarrisonHough authored Dec 22, 2023
1 parent 3ec98a0 commit 5a8164c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Editor/UI/EditorWindows/Templates/SubdomainTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ private EventCallback<ChangeEvent<string>> SubdomainChanged(VisualElement errorI
errorIcon.visible = !IsValidSubdomain();
if (changeEvent.previousValue == partnerSubdomain) return;
subdomainField.SetValueWithoutNotify(partnerSubdomain);
subdomainField.Focus(); // forces text to resize, making new subdomain value visible
if (changeEvent.newValue != partnerSubdomain)
{
subdomainField.Focus(); // forces text to resize, making new subdomain value visible
}
OnSubdomainChanged?.Invoke(partnerSubdomain);
};
}
Expand Down

0 comments on commit 5a8164c

Please sign in to comment.