bugfix for type with Input Method (such as chinese) on an empty meditor editor area