App crashed when user input the sms code into the html input tags.

When the user entered the SMS verification code in the web page, the app crashed. This will not reproduce absolutely, it will only happen on a few phones with iOS13-14. As shown in the figure, the SMS verification code does not appear in the middle of the toolbar, but on the left. Has anyone encountered this situation? Why is it so?

and then, this is the crash logs: Exception Codes: 0x00000000 at 0x0000000000000000 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSTaggedPointerString stringByReplacingCharactersInRange:withString:]: nil argument' (void std::__1::__call_once_proxy<std::__1::tuple<void (&)()> >(void*) + 15845284)

App crashed when user input the sms code into the html input tags.
 
 
Q