mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 06:47:01 +00:00
fix: fix mention list having no currentIndex on mouse select
This commit is contained in:
parent
edf3e99f08
commit
dc313e200a
@ -51,6 +51,14 @@ Rectangle {
|
||||
container.itemSelected(listView.model.get(listView.currentIndex), filterItem.lastAtPosition, filterItem.cursorPosition)
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible && listView.currentIndex === -1) {
|
||||
// If the previous selection was made using the mouse, the currentIndex was changed to -1
|
||||
// We change it back to 0 so that it can be used to select using the keyboard
|
||||
listView.currentIndex = 0
|
||||
}
|
||||
}
|
||||
|
||||
z: parent.z + 100
|
||||
visible: !shouldHide && filter.length > 0 && suggestionsModel.count > 0
|
||||
height: Math.min(400, listView.contentHeight + Style.current.smallPadding)
|
||||
|
Loading…
x
Reference in New Issue
Block a user