jQuery-menu-aim icon indicating copy to clipboard operation
jQuery-menu-aim copied to clipboard

Bug with the first row in a menu

Open jwensley2 opened this issue 11 years ago • 8 comments

There seems to be a bug where the first row won't be activated when opening a menu a second time if it was the row that was open before closing the menu.

I tested using the example in the repository and it also contains the bug, so I know it's not my own code causing it.

Steps to reproduce using the example.

  1. Click the menu and hover over the first item 'Patas'.
  2. Move off to the left and click to close the menu.
  3. Click the menu again and hover to the first item, it won't activate this time.

If you hover over any item other than the first one before closing the menu the bug doesn't occur.

jwensley2 avatar Apr 01 '13 20:04 jwensley2

Confirming the bug.

gabriensymons avatar Apr 03 '13 19:04 gabriensymons

I am confirming the bug. I have seen it as well.

From: Joseph Wensley [mailto:[email protected]] Sent: Monday, April 01, 2013 3:20 PM To: kamens/jQuery-menu-aim Subject: [jQuery-menu-aim] Bug with the first row in a menu (#14)

There seems to be a bug where the first row won't be activated when opening a menu a second time if it was the row that was open before closing the menu.

I tested using the example in the repository and it also contains the bug, so I know it's not my own code causing it.

Steps to reproduce using the example.

  1. Click the menu and hover over the first item 'Patas'.
  2. Move off to the left and click to close the menu.
  3. Click the menu again and hover to the first item, it won't activate this time.

If you hover over any item other than the first one before closing the menu the bug doesn't occur.

— Reply to this email directly or view it on GitHub https://github.com/kamens/jQuery-menu-aim/issues/14 . https://github.com/notifications/beacon/K_MDP7qB5lTyeCFXcxQkMBQmehDGPYyQPi-EFyEvfP3ktR1IPn69TUnflhQPI6vI.gif

zaggwarrior avatar Apr 04 '13 02:04 zaggwarrior

You can fix it by return true from exitMenu param exitMenu: function() { //........... return true; }

o1egl avatar Apr 30 '13 20:04 o1egl

It returns true by default, isn't it?

ogonki-vetochki avatar Apr 30 '13 23:04 ogonki-vetochki

return true; seemed to fix the issue for me. Thanks.

shobson avatar Aug 02 '13 16:08 shobson

If you close your menu in any way other than the exitMenu function you will have this bug too. #41 solves that.

bobbyrenwick avatar Oct 28 '13 09:10 bobbyrenwick

return true; seemed to fix the issue for me too. Thanks.

emateu avatar Jan 19 '14 05:01 emateu

Just modify this area of code:

    var mouseenterRow = function() {
            if (timeoutId) {
                // Cancel any previous activation delays
                clearTimeout(timeoutId);
            }

            options.enter(this);
            possiblyActivate(this);
            options.activate(activeRow); ///////////////////////// ADD THIS LINE OF CODE ^^
        }

alyiev avatar Oct 27 '17 20:10 alyiev