Bug 456641 - When adding an emoji, text cursor is moved to beginning
Summary: When adding an emoji, text cursor is moved to beginning
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-12 16:31 UTC by Jan Bidler
Modified: 2022-11-25 19:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Bidler 2022-07-12 16:31:03 UTC
SUMMARY
When adding an emoji via the emoji picker, the text cursor is moved to the beginning of the message

STEPS TO REPRODUCE
1. Open neochat and a room
2. Start typing "Hello from Neochat!"
3. Click on the emoji picker and select "😀"


OBSERVED RESULT
The text cursor will be moved to the beginning, aka before "Hello"

EXPECTED RESULT
The text cursor should stay as is

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.9-arch1-1 (64-bit)
Graphics Platform: Wayland
NeoChat: 22.06

ADDITIONAL INFORMATION
Works on multiline messages as well
Comment 1 Bug Janitor Service 2022-11-24 22:01:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/662
Comment 2 Tobias Fella 2022-11-25 19:50:07 UTC
Git commit 9d8cc5c9072b3a5b7ee4f5ec22fabcee96eff30b by Tobias Fella.
Committed on 25/11/2022 at 17:05.
Pushed by tfella into branch 'master'.

Fix cursor position when inserting emoji

M  +1    -0    src/qml/Component/ChatBox/ChatBar.qml
M  +4    -6    src/qml/Component/ChatBox/ChatBox.qml

https://invent.kde.org/network/neochat/commit/9d8cc5c9072b3a5b7ee4f5ec22fabcee96eff30b