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

GH-7767: Added context menu for input and textArea #7943

Merged
merged 1 commit into from
Jun 4, 2020
Merged

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Jun 2, 2020

Closes #7767.

Signed-off-by: Akos Kitta kittaakos@typefox.io

What it does

Enables the context menu in input and textArea elements. For electron only.

How to test

  • You can see the context menu for input and textArea,
  • You can Select All, Cut, Copy, and Paste.

Review checklist

Reminder for reviewers

Please keep in mind, that the input value will be automatically selected, so when you paste, the original value will be replaced. See here: microsoft/vscode#99126 (comment), I was confused by the SCM "input" for instance, but that's a monaco editor eventually.

Closes #7767.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@kittaakos kittaakos changed the title [WIP]: GH-7767: Added context menu for input and textArea GH-7767: Added context menu for input and textArea Jun 3, 2020
@kittaakos kittaakos marked this pull request as ready for review June 3, 2020 14:47
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes work really well! 👍 I verified both inputs and textarea

  • the search-in-workspace input
  • the scm textarea

I think we can also use this as an example to create a similar context-menu for the browser target.

@vince-fugnitto vince-fugnitto added electron issues related to the electron target menus issues related to the menu labels Jun 3, 2020
@kittaakos
Copy link
Contributor Author

for the browser target.

The browser supports them natively:

Screen Shot 2020-06-03 at 16 59 47

@vince-fugnitto
Copy link
Member

for the browser target.

Yes, but I was thinking we should do it for the browser target so that:

@kittaakos kittaakos merged commit c80f3fe into master Jun 4, 2020
@kittaakos kittaakos deleted the GH-7767 branch June 4, 2020 07:11
@thegecko
Copy link
Member

thegecko commented Jun 4, 2020

Nice, any electron screenshots?

@kittaakos
Copy link
Contributor Author

Sure.

screencast 2020-06-04 12-11-33

@kittaakos
Copy link
Contributor Author

Yes, but I was thinking we should do it for the browser target so that:

I do not like the idea; I am pretty happy with the native one. It does all I need, in fact, I would like to use the native one in electron too, but it's not possible as far as I know. The only reason I did this change is to be able to paste a password into the input from a password manager in electron env.

Of course, if you think this would add value to Theia, feel free to open a separate issue for discussion. If it's just something we could do, but there is no good reason doing it, let's just not do it.

@thegecko
Copy link
Member

thegecko commented Jun 4, 2020

I think in general we should use native implementations wherever possible. It feels more natural to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron issues related to the electron target menus issues related to the menu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[electron] Enable cut/copy/paste context menu on input and textarea
3 participants