Fix input focus when pressing reply button

This commit is contained in:
Nicolas Werner 2020-11-25 17:38:06 +01:00
parent c74077a41f
commit 08e9461611
5 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@ AbstractButton {
property color highlightColor: colors.highlight
property color buttonTextColor: colors.buttonText
focusPolicy: Qt.NoFocus
width: 16
height: 16

View File

@ -5,6 +5,7 @@ import im.nheko 1.0
TextEdit {
textFormat: TextEdit.RichText
readOnly: true
focus: false
wrapMode: Text.Wrap
selectByMouse: !Settings.mobileMode
color: colors.text

View File

@ -79,6 +79,7 @@ Rectangle {
placeholderTextColor: colors.buttonText
color: colors.text
wrapMode: TextEdit.Wrap
focus: true
onTextChanged: TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text)
onCursorPositionChanged: {
TimelineManager.timeline.input.updateState(selectionStart, selectionEnd, cursorPosition, text);

View File

@ -97,6 +97,7 @@ Page {
}
MenuItem {
// TODO(Nico): Fix this still being iterated over, when using keyboard to select options
visible: messageContextMenu.isEncrypted
height: visible ? implicitHeight : 0
text: qsTr("View decrypted raw message")

View File

@ -336,6 +336,7 @@ TimelineViewManager::setHistoryView(const QString &room_id)
if (room != models.end()) {
timeline_ = room.value().data();
emit activeTimelineChanged(timeline_);
container->setFocus();
nhlog::ui()->info("Activated room {}", room_id.toStdString());
}
}