p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

bug: Right-click context menu does not close when clicking outside (unlike file dropdown menu)

Open Himanshu-9977 opened this issue 2 months ago • 10 comments

p5.js version

1.11.10

What is your operating system?

Windows

Web browser and version

Brave : 1.83.118 Chromium: 141.0.7390.108 (Official Build) (64-bit)

Actual Behavior

When interacting with the file explorer in the p5.js Web Editor, the dropdown menu (triggered by clicking the down-arrow next to a file) correctly closes when the user clicks anywhere outside of it.

However, the right-click context menu behaves inconsistently. After right-clicking on a file to open the context menu, clicking elsewhere on the page does not close the menu. It remains on screen until a manual action is taken (e.g., selecting an option or reloading).

This creates an inconsistent UX and may cause confusion, especially since the dropdown and context menus are expected to behave similarly.

Expected Behavior

The right-click context menu should close automatically when clicking outside of it, consistent with the behavior of the file dropdown (down-arrow button).

Steps to reproduce

Steps:

  1. Open the p5.js Web Editor.
  2. In the file explorer, right-click on any file.
  3. A context menu appears.
  4. Click anywhere outside of the context menu.
  5. Observe that the menu does not close.

Himanshu-9977 avatar Oct 19 '25 08:10 Himanshu-9977

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.

welcome[bot] avatar Oct 19 '25 08:10 welcome[bot]

@Himanshu-9977 I can work on this issue can you assign me this?

CWAbhi avatar Oct 26 '25 12:10 CWAbhi

@Himanshu-9977 Hi, Can you share the screen for the issue, I checked it out and it is working fine.

yugalkaushik avatar Nov 02 '25 09:11 yugalkaushik

Hi @Himanshu-9977, I would be happy to work on a fix. Please let me know if I can be assigned to this.

ananyavashistha avatar Nov 13 '25 11:11 ananyavashistha

@yugalkaushik I agree it is working fine with me also.

piyushzingade avatar Nov 29 '25 22:11 piyushzingade

@Himanshu-9977 I guess the issue causing from the browser

piyushzingade avatar Nov 29 '25 22:11 piyushzingade

@piyushzingade @yugalkaushik Not really sure, if it's browser. But, it doesn't work still after so many days on my desk.

https://github.com/user-attachments/assets/2a79bc5f-779f-4cce-ac22-695bdf15adfc

Himanshu-9977 avatar Nov 30 '25 15:11 Himanshu-9977

@Himanshu-9977, have you tried on different browser??

piyushzingade avatar Nov 30 '25 15:11 piyushzingade

@Himanshu-9977 Hi himanshu, It can be some browser glitch, can you try it on some other browser.

yugalkaushik avatar Nov 30 '25 16:11 yugalkaushik

@piyushzingade I tried in Microsoft Edge as well. The problem persists for me.

Himanshu-9977 avatar Dec 03 '25 06:12 Himanshu-9977