-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
The "+" button that toggles the menu with options to create a folder and create a file does not close the menu when clicking anywhere else on the screen. #2524
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
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already. |
I have fix this issue and i have raise the pr. Final Output will look like this. Screencast.from.2023-10-21.20-11-46.webm |
I did some investigating here and the core issue is a stale closure of the p5.js-web-editor/client/modules/IDE/components/Sidebar.jsx Lines 40 to 47 in f21b847
The value of This setup wasn't/isn't an issue in the class components because we're looking at a property on an object, I handled it properly in a new p5.js-web-editor/client/components/Dropdown/DropdownMenu.jsx Lines 14 to 15 in f21b847
p5.js-web-editor/client/components/Dropdown/DropdownMenu.jsx Lines 31 to 38 in f21b847
IMO the best course of action for the long term would be to use that
|
@lindapaiste in the below part of code we don't actually need setTimeout function const onBlurComponent = () => {
setIsFocused(false);
setTimeout(() => {
if (!isFocused) {
dispatch(closeProjectOptions());
}
}, 200);
}; It will also work if we just dispatch without the setTimeout function. Correct me if I am wrong! const onBlurComponent = () => {
setIsFocused(false);
dispatch(closeProjectOptions());
}; |
Hey so I think that the intention of the When the focus changes from the first item in the list to the second, it goes through these steps:
In the |
@lindapaiste How about integrating an external library for this functionality? That way we don't have to apply this on our own and we can just add extra functions on top of that. I was looking around and found This React Component, you can check it. We can also add it to all dropdowns in the web app. |
Increasing Access
When we are clicking on the plus "+" for creating the folder or file the menu which get toggle is not close when we click any where on the screen.
Feature enhancement details
This will increase the user experience.
Screencast.from.2023-10-21.19-20-49.webm
The text was updated successfully, but these errors were encountered: