[StartChat]: fixed text input scroll

Closes #9885
This commit is contained in:
Alexandra Betouni 2023-04-10 18:23:08 +03:00
parent 52c01f1dd5
commit 620cad159a
1 changed files with 6 additions and 0 deletions

View File

@ -107,6 +107,12 @@ Item {
selectByMouse: true selectByMouse: true
selectionColor: Theme.palette.primaryColor2 selectionColor: Theme.palette.primaryColor2
selectedTextColor: color selectedTextColor: color
onCursorPositionChanged: {
if (scrollView.contentX > cursorRectangle.x)
scrollView.contentX = cursorRectangle.x;
if (scrollView.contentX < ((cursorRectangle.x+Style.current.smallPadding)-scrollView.width) && ((cursorRectangle.x+Style.current.smallPadding) > scrollView.width))
scrollView.contentX = (cursorRectangle.x-scrollView.width+Style.current.smallPadding);
}
cursorDelegate: StatusCursorDelegate { cursorDelegate: StatusCursorDelegate {
cursorVisible: edit.cursorVisible cursorVisible: edit.cursorVisible