Skip to content

Commit 5a8164c

Browse files
[SDK-719] fix: reverted force focus (#191)
- 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
1 parent 3ec98a0 commit 5a8164c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Editor/UI/EditorWindows/Templates/SubdomainTemplate.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ private EventCallback<ChangeEvent<string>> SubdomainChanged(VisualElement errorI
6868
errorIcon.visible = !IsValidSubdomain();
6969
if (changeEvent.previousValue == partnerSubdomain) return;
7070
subdomainField.SetValueWithoutNotify(partnerSubdomain);
71-
subdomainField.Focus(); // forces text to resize, making new subdomain value visible
71+
if (changeEvent.newValue != partnerSubdomain)
72+
{
73+
subdomainField.Focus(); // forces text to resize, making new subdomain value visible
74+
}
7275
OnSubdomainChanged?.Invoke(partnerSubdomain);
7376
};
7477
}

0 commit comments

Comments
 (0)