Fix the bug causing `java.lang.StringIndexOutOfBoundsException` crashes when showing the virtual keyboard
#pragma once