Created attachment 147053 [details] How it looks like currently. See attached screenshot; when LibreOffice is embedded in a Java application as a widget and the user causes LibreOffice to loose focus (e.g. switch between the tabs of the Java app), the menu or context menu of LibreOffice is still there. The leftover menu is definitely problematic for the embedded case, but it seems other applications (just just e.g. Notepad) close menus on focus loss as well, so doing this in the non-embedded case seems to improve consistency as well.
Tested this on Windows only, I seem to recall there are additional issues around menus on X e.g.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/f21d2b48bd68424a96aa6cd5572e368208378291%5E%21 tdf#121723 vcl: leave popup mode on focus loss of toplevel windows It will be available in 6.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 113362 has been marked as a duplicate of this bug. ***
This also fixes the problem described in Bug 113362: > 1. On Windows, open Writer and Impress side-by-side. > 2. In Impress, click on File menu. > 3. Click on Writer's title bar (note that menu in Impress is still open, and cursor is blinking in Writer). > 4. Type single character "i". > > Expected: "i" in Writer. > Actual result: Properties dialog from Impress is shown, nothing is typed in Writer. The "Properties" subitem of "File" menu that was open in Impress, has "i" as accelerator.
Hi Miklos, Since your commit fixes bug 113362 as well, should it be backported to 6.2 branch at least ?
Yes, I'll push a backport in a moment.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-6-2": https://git.libreoffice.org/core/+/c5000631d3570af93a66d7aa12f78979a14344a5%5E%21 tdf#121723 vcl: leave popup mode on focus loss of toplevel windows It will be available in 6.2.0.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 139729 has been marked as a duplicate of this bug. ***