Menu: fix TextFieldContextMenu opening at wrong position
QQuickMenu places the menu based on the size of its parent and its size, but when all menu items are invisible, the ListView in Menu.qml calculates its contentHeight based on an assumed average size (100), which causes the menu height to become excessively huge when there are many invisible menu items, so when repositioning the menu will be placed at a wrong position.
This uses childrenRect to only include visible items.
BUG: 481293 FIXED-IN: 6.0
Before | After |
---|---|