Fix AttributeError when canceling card creation with Kanji field focused

Although the error disappeared, please, @cayennes, check if the fix is correct as I'm not a Python programmer.

Thanks