Message search always jumps to second result
When searching for a string using the chat message search bar, the first result will always be jumped over and the second occurence is marked.
This is due to the default behavior of Kirigami's SearchField component:
autoAccept: true
causes the SearchField component to simulate an "Enter" key press after every typed letter in the search field.
The searchField
QML item has two triggers assigned:
onTextChanged: searchUpwardsFromBottom()
onAccepted: searchFromCurrentIndex(true)
Thus, after entering a letter in the search field, the onTextChanged
as well as the onAccepted
triggers are being called and search is being executed twice.
Setting autoAccept: false
fixes the issue.
I have already pushed this fix and added it to the upcoming merge request for #318 (closed).