Tk Source Code

View Ticket
Login
Ticket UUID: f9d316a5e0106e765ce701763a0e8aef81a7d81e
Title: linux menu problem if menu near the bottom of screen
Type: Bug Version: tk 8.6.9, 8.6.18, 9.0.5, 9.1b1
Submitter: anonymous Created on: 2022-05-10 21:55:34
Subsystem: 12. Unix Menus Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-09-30 20:35:36
Resolution: Fixed Closed By: nemethi
    Closed on: 2026-09-30 20:35:36
Description:
Menus that are dropped down from a menu-bar do not remain on screen when you release the left mouse button -if- that menu would have partially appeared below the bottom of the screen. In other cases, if you release the left button, the menu remains so you can then select the item you want.

Because of the positioning of the menu (it's adjusted upward to fit on the screen) when you release the left button, it's over some menu item, and regardless of which item that is, it is invoked, as though you had chosen it. 

Firefox, for ex, positions these sorts of menus above the menu-bar, so you can't accidentally invoke an item you didn't intend.

To test, just take any tk program with a menu/menu-bar and move its window near the bottom of the screen and try to select a menu item. If you forget and release the left button, the problem happens.

On windows, this doesn't happen either. I am using a ubuntu linux.
User Comments: nemethi (claiming to be Csaba Nemethi) added on 2026-09-30 20:35:36:

Serhiy, many thanks! The fix is now in main, core-9-0-branch, and core-8-6-branch; see commits [0f866663], [5c47ae3e], and [3aacabb1].


serhiy.storchaka added on 2026-09-30 08:46:22:

Duplicate of [470331]. Proposed fix in branch menu-post-under-pointer: as in Firefox, a menu which does not fit below the menubar is posted above it. A menu which still covers the pointer does not invoke an entry on the release of the click which posted it. See [470331] for details.