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] Right-click menu issues #5848

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

[CLOSED] Right-click menu issues #5848

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

Comments

@core-ai-bot
Copy link
Member

Issue by thany
Thursday Jan 09, 2014 at 16:30 GMT
Originally opened as adobe/brackets#6430


First of all, the right-click menu (in the code editor) does work. But making it disappear does not :)

The only way to make the right-click menu disappear is to select an item, but left-clicking somewhere else does not make it disappear (which is very odd, because that's default Windows behavior...) Hitting Esc does make it disappear, so there is a way at least.

Also the right-click menu needs waaaay more options. I would suggest to copy over some of the most frequently used items from the Edit menu.

Another thing is when no text is selected, it automatically selected a word or whole line, which may inflict confusion when dismissing it after accidentally opening it, and carrying on editing (that selection would be overwritten by mistake). A context menu should not select text - if the items require that, then disable them if no text is selected.

/edit
Just noticed this not-wanting-to-disappear issue also goes for the right-click menu on files. But not for the menu bar at the top.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Thursday Jan 09, 2014 at 18:43 GMT


@thany, are you using a Themes extension?

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Thursday Jan 09, 2014 at 20:53 GMT


@thany Addressing each of your three issues separately...

  1. The right-click menu is hidden when you click anywhere within the Brackets UI, but it's not hidden if you click elsewhere on the screen (including clicking on the Brackets window's own chrome). This is a known issue.

  2. We haven't had a lot of design discussion about how big the editor context menu should be. I think in general we prefer to keep context menus relatively short (unlike some IDEs where they are giant, and not necessarily very contextual). We have a backlog item for adding cut/copy/paste to the context menu, but nothing is tracking the larger question of what else should go on that menu. I'll mark this issue 'move to backlog' as a reminder for us to have that discussion.

  3. It is definitely a bit odd that we select the current word when right-clicking if nothing was selected previously -- especially since sometimes that still doesn't result in a selection (e.g. when right-clicking past the end of the line, or between two non-word characters). Personally I wouldn't be opposed to ripping that out if anyone wants to submit a PR for it...

@core-ai-bot
Copy link
Member Author

Comment by thany
Thursday Jan 09, 2014 at 23:01 GMT


  1. You are right. The Themes for Brackets extensions may be causing that issue. Or not, but I report it there and if needed, let you fight it out, so to speak :)

  2. Too big is certainly not good either. However, missing default items that even notepad has, feels a bit odd. So please do have that discussion, Im curious what will come of it. Maybe try to somehow find out what users do (or would do) with a context menu, that should definately help.

  3. Small note: Opera has a feature where you can doubleclick text, and it'll select something useful (like a word) and pop up the context menu right away. Maybe it's an idea to do the current word-selection behavior that way? Or maybe after a tripleclick if it's too annoying? I dunno, just throwing a bone here.

(hm, maybe I should have created separate issues now that I see how this disussion is going... apologies)

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Friday Jan 10, 2014 at 09:26 GMT


@thany, sounds good. The reason I asked is I already filed this issue a while ago: MiguelCastillo/Brackets-Themes#9.

However, it looks like you are using the other Themes extension. There's a lot of common code between these two extensions, so maybe the developer there can figure out the solution and we can get it fixed in both extensions.

Also, you can confirm that this issue is caused by Themes by removing Themes and seeing if the problem is still there. Pretty sure the extension is causing the problem you are seeing though.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Friday Jan 10, 2014 at 10:04 GMT


@peterflynn, the first issue is an Extension bug and it sounds like the second issue is a "move to backlog". If the third issue is something to address, maybe an issue title change is in order?

@core-ai-bot
Copy link
Member Author

Comment by thany
Friday Jan 10, 2014 at 11:01 GMT


Another option is to use middleclick, because that's not assigned to anything yet (or so it seems), while tripleclick is. Although not nearly all pointing devices have a middle mouse button (think touchpads, designer tablets, trackballs). Hm...

@core-ai-bot
Copy link
Member Author

Comment by lallmon
Saturday Apr 19, 2014 at 07:04 GMT


Why exactly is Brackets imposing weirdo functionality (other than opening the contextual menu, which would be sane and expected on all platforms) when you right click?

For instance:

  • Reload brackets without Extensions
  • CMD-A to select all text in a file
  • Right click.
    Brackets replaces ALL TEXT with a dash? 👀

I am running the most up to date master version as of tonight, so maybe it's not doing this in the current sprint release?

Because contextual menu right click is nearly universal, Brackets should not edit the file automatically in any way, which also messes up any Extensions that might want to use that contextual menu.

This bums me out man.

@peterflynn@thany@lkcampbell

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Saturday Apr 19, 2014 at 14:45 GMT


@LucasKA, I agree with you, that is a really weird bug. Good catch!

It doesn't seem to happen on every file I try it on but I can definitely repro it on some files.

Would you mind filing a new issue on it? I will play around with it today also and see if I can figure out what the heck is going on.

@core-ai-bot
Copy link
Member Author

Comment by MiguelCastillo
Saturday Apr 19, 2014 at 15:01 GMT


I am debugging this issue right now... I noticed that documents are marked as modified when right clicking on them as well.

The issue is really happening in what CodeMirror does when setting the theme. There is really nothing that Themes is doing to interject in the click event handling directly. But events are getting blocked under some circumstances when a theme is set in CodeMirror. Hopefully I will come up with something to resolve this issue soon enough.

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Saturday Apr 19, 2014 at 15:21 GMT


I can reproduce the new issue reported by@LucasKA in a vanilla CodeMirror demo page and just file this issue codemirror/codemirror5#2481.

Update: This new issue is not in sprint 38, it is only in master with recent CodeMirror update. Thanks@LucasKA for catching it.

@core-ai-bot
Copy link
Member Author

Comment by lallmon
Saturday Apr 19, 2014 at 15:31 GMT


@MiguelCastillo Yes that's definitely another issue. Another would be if you have just a word selected, and you right click, it deselects the word and moves the cursor to the end.

@lkcampbell Should I still file an issue in Brackets now that@RaymondLim filed that one at CodeMirror? Also, should I file a separate issue for each behavior?

@core-ai-bot
Copy link
Member Author

Comment by MiguelCastillo
Saturday Apr 19, 2014 at 15:34 GMT


Ok, just to be clear, I am debugging the issue where the menu does not disappear... But yes, the issue with the cursor moving to the end of the word and stuff is definitely another issue.

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Saturday Apr 19, 2014 at 15:42 GMT


@LucasKA Yes, each issue that is different from the original context menu issues should be filed as a separate issue.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Saturday Apr 19, 2014 at 15:45 GMT


@LucasKA, you know, we might as well get some separate issues filed. This issue has become pretty confusing because there are so many things being discussed.

File your issue with the hyphen as one issue and make sure to include a link to the CodeMirror issue that@RaymondLim filed because it will become our tracking issue.

And, yeah, if you can get good repros on the other issues (not including the issue that@MiguelCastillo is working on for Themes), file those issues as well. Then maybe we can close this issue in lieu of those other filing and reduce the confusion.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Saturday Apr 19, 2014 at 15:48 GMT


@LucasKA, to clarify, the issue that you do not need to file is issue 1, where the right click menu is not going away when using themes.

@MiguelCastillo is working on that issue as part of his Themes work and it is already filed at:

MiguelCastillo/Brackets-Themes#9

But the other two, if you have good repros, please file them separately.

@core-ai-bot
Copy link
Member Author

Comment by lallmon
Saturday Apr 19, 2014 at 16:22 GMT


@lkcampbell Alright, they are filed.

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Saturday Apr 19, 2014 at 17:14 GMT


To summarize, issues discussed in this issue:

MiguelCastillo/Brackets-Themes#9
adobe/brackets#7575
adobe/brackets#7576
adobe/brackets#7577
codemirror/codemirror5#2481

I am going to close this issue since all of its components are now addressed by other issue reports.

@thany, if you feel like we missed anything, please file a new issue so that we can address each one separately. Thanks for everyone's help on catching all of these context menu bugs!

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