# HG changeset patch # User souliane # Date 1450181060 -3600 # Node ID 1f054ba3245ec033b5e6e8440e576105b64e8178 # Parent 89a0cd2aa7631b590f593c9972e9e0cb35334a55 browser_side: fixes JID as login detection, can't rely on "@" keycode diff -r 89a0cd2aa763 -r 1f054ba3245e src/browser/sat_browser/register.py --- a/src/browser/sat_browser/register.py Thu Dec 10 13:30:27 2015 +0100 +++ b/src/browser/sat_browser/register.py Tue Dec 15 13:04:20 2015 +0100 @@ -45,8 +45,6 @@ from constants import Const as C -KEY_AROBASE = 81 # XXX: this is the keycode for onKeyUp, the one which works for onKeyPress is 64! - class RegisterPanel(FormPanel): @@ -171,9 +169,9 @@ def onKeyUp(self, sender, keycode, modifiers): # XXX: this is triggered after the textbox value has changed if sender == self.login_box: - if keycode == KEY_AROBASE: + if "@" in self.login_box.getText(): self.login_warning_msg.setHTML(_('Entering a full JID is only needed to connect with an external XMPP account.')) - elif "@" not in self.login_box.getText(): + else: self.login_warning_msg.setHTML("") def onKeyDown(self, sender, keycode, modifiers):