Restore focus to previous element on HMenu closed
This commit is contained in:
parent
2769d60fdc
commit
1bd012c871
|
@ -22,4 +22,10 @@ Menu {
|
||||||
border.color: theme.controls.menu.border
|
border.color: theme.controls.menu.border
|
||||||
border.width: theme.controls.menu.borderWidth
|
border.width: theme.controls.menu.borderWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onAboutToShow: previouslyFocused = window.activeFocusItem
|
||||||
|
onClosed: if (previouslyFocused) previouslyFocused.forceActiveFocus()
|
||||||
|
|
||||||
|
|
||||||
|
property var previouslyFocused: null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user