# HG changeset patch # User souliane # Date 1395390027 -3600 # Node ID ae598511850d284da968e26dd5bdeb3e3c0b2c0f # Parent 7a8991cda2fa3cffeb5ec3704cdb6af8fdfa1999 browser_side: set microblog editor minimal width + fix the scrolling to comment diff -r 7a8991cda2fa -r ae598511850d browser_side/panels.py --- a/browser_side/panels.py Thu Mar 20 22:16:02 2014 +0100 +++ b/browser_side/panels.py Fri Mar 21 09:20:27 2014 +0100 @@ -470,12 +470,19 @@ def onClick(self, sender): if sender == self: + try: # prevent re-selection of the main entry after a comment has been focused + if self.__ignoreNextEvent: + self.__ignoreNextEvent = False + return + except AttributeError: + pass self._blog_panel.setSelectedEntry(self) elif sender == self.delete_label: self._delete() elif sender == self.update_label: self.edit(True) elif sender == self.comment_label: + self.__ignoreNextEvent = True self._comment() def __modifiedCb(self, content): @@ -566,6 +573,7 @@ """Add an empty entry for a new comment""" if self._current_comment: self._current_comment.bubble.setFocus(True) + self._blog_panel.setSelectedEntry(self._current_comment) return data = {'id': str(time()), 'new': True, @@ -581,6 +589,7 @@ entry._parent_entry = self self._current_comment = entry self.edit(True, entry) + self._blog_panel.setSelectedEntry(entry) def edit(self, edit, entry=None): """Toggle the bubble between display and edit mode diff -r 7a8991cda2fa -r ae598511850d public/libervia.css --- a/public/libervia.css Thu Mar 20 22:16:02 2014 +0100 +++ b/public/libervia.css Fri Mar 21 09:20:27 2014 +0100 @@ -883,12 +883,9 @@ width: 20; } -.bubble-editbox { +.bubble textarea{ width: 100%; -} - -.bubble-editbox textarea{ - width: 100%; + min-width: 300px; } .mb_entry_timestamp {