Menu

#1079 Displaced Menus do not stay open.

obsolete: 8.5.4
open-accepted
5
2008-08-19
2001-10-11
No

When
a) a menubutton is near the lower edge of the screen
b) the user tries to open the menu with a simple click
(and immediately releases the mouse button)
c) the menu is too long to be displayed in full
length on the remaining screen space and is
displaced:

the menu will immediately disappear again, selecting
an entry that is under the mouse pointer after
displacement. The user has no chance to select, nor
does he even see what he selected. Anything including
some really evil things like deleting files etc. can
happen.

Expected behaviour:
The menu should simply stay open as it is doing
when it does not need to be displaced.

Note: On Windows this works as expected!
No test has been performed on the Mac.
Xaw(3D) does it wrong too, Motif/GTK do it right
but displace in a different way.

Sample Script:
Run it. Place the window on the lower edge of your
screen. Do a single click on "File". The application
quits unexpectedly...

-snip-
# Create a menubar
#
menu .mb -type menubar
. config -menu .mb
.mb add cascade -label File -underline 0 -menu .mb.file
menu .mb.file -tearoff 0
.mb.file add command -label Exit -command exit
.mb.file add command -label Exit -command exit
.mb.file add command -label Exit -command exit
.mb.file add command -label Exit -command exit
.mb.file add command -label Exit -command exit
.mb.file add command -label Exit -command exit
.mb.file add command -label Exit -command exit
.mb.file add command -label Exit -command exit
.mb.file add command -label Exit -command exit
.mb.file add command -label Exit -command exit
.mb.file add command -label Exit -command exit

frame .f -width 200 -height 100
pack .f -side top -fill both -expand 1
update
-snap-

Discussion

  • Todd Helfter

    Todd Helfter - 2008-08-19

    Logged In: YES
    user_id=92123
    Originator: NO

    The included script behaves the same with Tk 8.5.4 and Tk 8.6 on my test system.
    I'm not convinced that this is a bug however, though I agree it is annoying.

    When the posted menu is too near the bottom of the screen. Selecting the Menu causes one of the menu items to appear under the cursor. Simply releasing the mouse button causes that menu item to be executed. If one moves the mouse pointer off of the menu list item. The button can be released without invoking anything and in fact the menu paints. Correcting this would require changing the 'X' location of the menu as well as adjusting the Y to fit the menu on the screen.

     
  • Todd Helfter

    Todd Helfter - 2008-08-19
    • milestone: 114011 --> obsolete: 8.5.4
    • status: open --> open-accepted
     
MongoDB Logo MongoDB