Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Clicking project-dropdown-toggle again closes the dropdown #4990

Open
core-ai-bot opened this issue Aug 30, 2021 · 5 comments
Open

Comments

@core-ai-bot
Copy link
Member

Issue by MarcelGerber
Saturday Oct 05, 2013 at 19:26 GMT
Originally opened as adobe/brackets#5435


It hides the dropdown when you click on the button again (the behaviour before was really confusing to me)


MarcelGerber included the following code: https://github.com/adobe/brackets/pull/5435/commits

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Tuesday Oct 15, 2013 at 00:01 GMT


@SAPlayer, can you make this work for the shortcut key (CTRL+ALT+R) as well? The old code probably needs to be cleaned up a bit because, for some reason, the key event handler and the mouse event handler have been separated out and now they act differently, which is bad. Both events should call the same handler so the behavior is the same regardless of whether you click the button or you hit the shortcut key.

@core-ai-bot
Copy link
Member Author

Comment by MarcelGerber
Tuesday Oct 15, 2013 at 14:08 GMT


@lkcampbell I tried to, but I don't get it to work. For some reason, I can't access $dropdown from handleKeyEvent.
Just try to add console.log($dropdown); to the first line of handleKeyEvent, and you will either get undefined or null. It works just fine in handleMouseEvent.

Can anybody of you maybe take a look at it?

@core-ai-bot
Copy link
Member Author

Comment by njx
Tuesday Oct 15, 2013 at 17:34 GMT


@lkcampbell I'm not totally convinced they should have exactly the same behavior, at least not the way the dropdown is currently constructed. When you open it from the keyboard, it selects the first folder as a convenience. However, when you click on it with the mouse, I'm not sure it would make sense to highlight an item before you mouse over it.

(In typical OS dropdowns, when you click on the button, the currently selected item is highlighted, and on the Mac, it actually positions the popup so that the selected item is over the dropdown button and therefore under the mouse initially. However, the project menu doesn't actually show the current project, since it was intended to act like a recent files list.)

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Tuesday Oct 15, 2013 at 19:19 GMT


@njx, that's fine, I just figured it was a fairly subtle UI difference that didn't hurt the mouse click behavior. I'm more concerned about having two functions that need to be kept in sync instead of just one.

@core-ai-bot
Copy link
Member Author

Comment by JeffryBooher
Monday Oct 21, 2013 at 22:09 GMT


Change looks good.@njx any reservations about changing the behavior? This feels like how OS combo/menu affordances work so I'm good with taking it as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant