brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] right click menu only disappears when you hit ESC #6676

Open core-ai-bot opened 2 years ago

core-ai-bot commented 2 years ago

Issue by zakphi Friday Apr 04, 2014 at 05:58 GMT Originally opened as https://github.com/adobe/brackets/issues/7405


whenever i right click on something and the menu appears, the only way to make the menu disappear is by clicking ESC. if you have the menu up and you right click in another spot, the menu just moves to the new spot. clicking the left button doesn't do anything when the menu is up.

core-ai-bot commented 2 years ago

Comment by lkcampbell Friday Apr 04, 2014 at 16:02 GMT


@zakphi, did you try reloading Brackets without extensions to see if the problem is still there?

If you haven't, you can do this by selecting Debug > Reload Without Extensions.

In particular, this might be caused by either one of the Themes extensions.

core-ai-bot commented 2 years ago

Comment by MarcelGerber Friday Apr 04, 2014 at 16:22 GMT


Well, I can repro this with only brackets-git enabled...

core-ai-bot commented 2 years ago

Comment by peterflynn Friday Apr 04, 2014 at 18:01 GMT


@SAPlayer Does it repro without brackets-git? It works fine on my machine, but I don't have that extension...

core-ai-bot commented 2 years ago

Comment by zakphi Friday Apr 04, 2014 at 18:07 GMT


@lkcampbell your solution worked. the problem was due to the theme extension i have installed. for your information, the theme extension i am using is called Themes for Brackets by Jacob Lauritzen (jacsebl@hotmail.com)

core-ai-bot commented 2 years ago

Comment by lkcampbell Friday Apr 04, 2014 at 18:11 GMT


Yes, it's a known bug on both versions of the Themes extensions because they share some common code and the bug is in that common code. FYI, here are the issues:

https://github.com/MiguelCastillo/Brackets-Themes/issues/9 https://github.com/Jacse/themes-for-brackets/issues/24

core-ai-bot commented 2 years ago

Comment by MiguelCastillo Saturday Apr 19, 2014 at 13:32 GMT


This issue has been haunting themes for the longest time. I debugged this a while ago and traced it to a CodeMirror piece of logic. I kinda gave up when I saw that the issue is berried somewhere in CodeMirror. Unfortunate. I think I should be taking a second look at this in the next couple of days.

core-ai-bot commented 2 years ago

Comment by peterflynn Monday Apr 21, 2014 at 17:29 GMT


@MiguelCastillo Are there themes that remove the pointer-events: none from the CodeMirror DOM node? That could definitely break things like this... Ideally themes would only touch colors, for safety.

core-ai-bot commented 2 years ago

Comment by MiguelCastillo Monday Apr 21, 2014 at 17:49 GMT


@peterflynn I am not sure themes commonly will do that because that's more of an interaction thing that themes generally wont use. I do that in my interactive linter so that I can enable clicking on the items on the gutter. But for themes? I haven't seen it yet.

I spent sometime this Sunday on this nasty menu thing... It's definitely a timing issue inside of CodeMirror and its addons. Here is how I was able to test that.

A quick way to reproduce the issue: Open up the context menu on a JavaScript file and then clicking on a curly bracket so that the match bracket parser kicks in. With themes installed, you see that the menu does NOT go away. Without themes, the menu does go away. I can reproduce this issue without themes with breakpoints in the code.

  1. Remove themes
  2. Added a $("html").on("click")...
  3. Set a break point in CodeMirror in lines a. 2726 b. 2521

If I enable the breakpoint on 2521 and then continue code execution, my jQuery event listener would never get called... And the breakpoint on 2726 never gets called. If I disabled breakpoint 2521, then listener gets called and 2726 also kicks in.

I am trying to extract this whole behavior in a more simplified environment so that I can log this issue Marijnh.

Really crappy that Themes is just exposing this issue.