Commit 77a618a8 authored by mathieui's avatar mathieui

Fix: do not scroll right by default in dataforms/bookmark text

Seeing "…@muc.example.com" instead of "toto@muc.…" is not really
helpful, especially in bookmarks.
parent 6c0be695
Pipeline #3958 passed with stages
in 5 minutes and 36 seconds
......@@ -19,7 +19,8 @@ class BookmarkNameInput(FieldInput, Input):
FieldInput.__init__(self, field)
Input.__init__(self)
self.text = field.name
self.pos = len(self.text)
self.pos = 0
self.view_pos = 0
self.color = get_theme().COLOR_NORMAL_TEXT
def save(self) -> None:
......@@ -39,7 +40,8 @@ class BookmarkJIDInput(FieldInput, Input):
jid = JID('')
jid.resource = field.nick or None
self.text = jid.full
self.pos = len(self.text)
self.pos = 0
self.view_pos = 0
self.color = get_theme().COLOR_NORMAL_TEXT
def save(self) -> None:
......
......@@ -330,7 +330,8 @@ class TextSingleWin(FieldInputMixin, Input):
Input.__init__(self)
self.text = field.get_value() if isinstance(field.get_value(), str)\
else ""
self.pos = len(self.text)
self.pos = 0
self.view_pos = 0
self.color = get_theme().COLOR_NORMAL_TEXT
def reply(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment