jQuery-menu-aim
jQuery-menu-aim copied to clipboard
Bug with the first row in a menu
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.
- Click the menu and hover over the first item 'Patas'.
- Move off to the left and click to close the menu.
- 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.
Confirming the bug.
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.
- Click the menu and hover over the first item 'Patas'.
- Move off to the left and click to close the menu.
- 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
You can fix it by return true from exitMenu param exitMenu: function() { //........... return true; }
It returns true by default, isn't it?
return true; seemed to fix the issue for me. Thanks.
If you close your menu in any way other than the exitMenu
function you will have this bug too. #41 solves that.
return true; seemed to fix the issue for me too. Thanks.
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 ^^
}