Fix AttributeError when closing card creation dialog with Kanji field selected

Although the error disappeared, please, @cayennes, check if the fix is correct as I'm not a Python programmer.

Thanks
Merge pull request #33 from LucasEasedUp/patch-1

Fix AttributeError when canceling card creation with Kanji field focused