mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
Cleanup text after calling GetTextInfo
Turns out GetTextInfo changes text internally and because TextBoxTMP#GiveFocus now sets caretPos based on text length it was causing crashes.
This commit is contained in:
1 file changed
+1
@@ -23,6 +23,7 @@ internal static class CursorPosPatch
|
||||
if (self.textInfo == null || self.textInfo.lineCount == 0 || self.textInfo.lineInfo[0].characterCount <= 0)
|
||||
{
|
||||
__result = self.GetTextInfo(" ").lineInfo.First().lineExtents.max;
|
||||
self.text = string.Empty;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user