Don't you need to also do this.hasActiveKeyboard = false here?