# HG changeset patch # User Goffi # Date 1358112376 -3600 # Node ID d97b0cba8b04cf19bbfe56df7baa4203da853c37 # Parent 3d998119237ead56dca4359e59a2f607e9797541 browser side: fix the line jump in unibox after entering something (work around a pyjamas bug) diff -r 3d998119237e -r d97b0cba8b04 browser_side/panels.py --- 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):