Fix input focus when pressing reply button

pull/335/head
Nicolas Werner 4 years ago
parent c74077a41f
commit 08e9461611
  1. 1
      resources/qml/ImageButton.qml
  2. 1
      resources/qml/MatrixText.qml
  3. 1
      resources/qml/MessageInput.qml
  4. 1
      resources/qml/TimelineView.qml
  5. 1
      src/timeline/TimelineViewManager.cpp

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

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

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

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

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

Loading…
Cancel
Save