Add more tests

This commit is contained in:
James Graham
2026-01-02 15:04:15 +00:00
parent 9ea76ca5d0
commit d10fe4a684
18 changed files with 822 additions and 221 deletions

View File

@@ -71,20 +71,6 @@ QQC2.TextArea {
event.accepted = true;
Message.contentModel.keyHelper.down();
}
Keys.onLeftPressed: (event) => {
if (cursorPosition == 1) {
event.accepted = true;
} else {
event.accepted = false;
}
}
Keys.onRightPressed: (event) => {
if (cursorPosition == (length - 1)) {
event.accepted = true;
return;
}
event.accepted = false;
}
Keys.onDeletePressed: (event) => {
event.accepted = true;
@@ -123,12 +109,6 @@ QQC2.TextArea {
Message.contentModel.setFocusRow(root.index, true)
}
onCursorPositionChanged: if (cursorPosition == 0) {
cursorPosition = 1;
} else if (cursorPosition == length) {
cursorPosition = length - 1;
}
TapHandler {
enabled: !root.hoveredLink
acceptedDevices: PointerDevice.TouchScreen

View File

@@ -191,7 +191,7 @@ void ChatBarMessageContentModel::focusCurrentComponent(const QModelIndex &previo
return;
}
textItem->setCursorFromTextItem(textItemForIndex(previousIndex), down, MessageComponentType::Quote ? 1 : 0);
textItem->setCursorFromTextItem(textItemForIndex(previousIndex), down);
}
void ChatBarMessageContentModel::refocusCurrentComponent() const