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

Right click menu doesn't disappear on left click #9

Closed
lkcampbell opened this issue Apr 10, 2013 · 8 comments
Closed

Right click menu doesn't disappear on left click #9

lkcampbell opened this issue Apr 10, 2013 · 8 comments

Comments

@lkcampbell
Copy link
Collaborator

Repro Steps:

  1. Open any text file in Brackets that has more than a page of code
  2. Select any theme besides the default theme (I use Blackboard).
  3. Uncheck View > Highlight Active Line
  4. Right click anywhere on the text and observe that right click context menu appears
  5. Left click anywhere on the text multiple times
  6. Check View > Highlight Active Line
  7. Right click anywhere on the text and observe that right click context menu appears
  8. Left click anywhere on the text multiple times

Observed behavior:
The right click context menu stays visible even after I left click the text. It eventually disappears but I can often left click 2-5 times before it happens.

After you check Highlight Active Line, the right click context menu never disappears no matter how many times you left click.

Expected behavior:
The right click context menu should always disappear after the first left click, whether the Highlight Active Line is checked or not.

@MiguelCastillo
Copy link
Owner

Interesting! I had noticed this behavior and for good or bad I got used to ignoring it. I have absolutely no logic for any sort of clicks... I need to investigate this a bit, but my hunch is that this is a bug in brackets.

Thank you Lance

@lkcampbell
Copy link
Collaborator Author

I thought it was a Brackets bug at first as well. Even filed a bug on it: adobe/brackets#3397.

However, @RaymondLim wasn't able to reproduce it on Win or Mac. So, I removed the Themes extension and also tried out the default theme with Themes extension installed. In both cases, the problem goes away. The Themes extension is definitely causing the problem.

@MiguelCastillo
Copy link
Owner

Yes, I tracked it down to the call into code mirror to set the theme. Somehow when I make a call into codemirror to set a theme click events don't properly propagate in the dom. And this issue gets even worse when Active Line Highlighting is on.

It seems like I am battling with an issue that's caused somewhere between Code Mirror and its addon... I will give it another crack sometime tonight.

I did a quick search in brackets' code and didn't find anything that could be causing issues, but I have not completely taken brackets out of the equation.

Generally when handling menus, there is a global click event handler that closes any open menu... I am setting my own handler and its behavior is rather eradic when Active Line Hightlight is on.

@MiguelCastillo
Copy link
Owner

Hi Lance. I put in a small hack in themes to help the issue with context menus within a document. The issue still happens when you have a menu outside of the document and then click on the document. This issue is really strange and I am not 100% if brackets or codemirror is causing the issue.

What I have been able to find is that if you do not have the default selected, the issue happens. Even in mixed mode you can select all themes you want, but as soon as the default theme isn't selected all the menu break. :(

The changes I put in place are not perfect but definitely help while the real issue is addressed.

@lkcampbell
Copy link
Collaborator Author

This issue just got filed on the other Themes extension as well. Posting link here to create a connection:

Jacse/themes-for-brackets#24

@MiguelCastillo
Copy link
Owner

@lkcampbell I checked in a change to address this. Can you verify if you can have this problem? 7edd84d

@MiguelCastillo
Copy link
Owner

Please?? :)

@lkcampbell
Copy link
Collaborator Author

@MiguelCastillo, yes, it looks like it is fixed, thanks!

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

2 participants