Mercurial > libervia-web
changeset 174:d97b0cba8b04
browser side: fix the line jump in unibox after entering something (work around a pyjamas bug)
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 13 Jan 2013 22:26:16 +0100 |
parents | 3d998119237e |
children | 764ca916e56e |
files | browser_side/panels.py |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/browser_side/panels.py Sun Jan 13 20:30:42 2013 +0100 +++ b/browser_side/panels.py Sun Jan 13 22:26:16 2013 +0100 @@ -443,6 +443,13 @@ type = "UNKNOWN" return (type, target) + def onBrowserEvent(self, event): + #XXX: woraroung a pyjamas bug: self.currentEvent is not set + # so the TextBox's cancelKey doens't work. This is a workaround + # FIXME: fix the bug upstream + self.currentEvent = event + TextArea.onBrowserEvent(self, event) + def onKeyPress(self, sender, keycode, modifiers): _txt = self.getText() if not self._popup: @@ -468,6 +475,7 @@ self.host.bridge.call('sendMessage', None, str(_chat.target), _txt, '', mess_type) self.setText('') self._timeCb(None) #we remove the popup + sender.cancelKey() """def complete(self):