Ctrl+Enter works when creating but not when updating a comment #12918

Closed
opened 2025-11-02 10:24:57 -06:00 by GiteaMirror · 18 comments
Owner

Originally created by @bilogic on GitHub (Apr 26, 2024).

Originally assigned to: @wxiaoguang on GitHub.

Description

I often use Ctrl + Enter when saving comments, but it only works when creating a new comment/issue, has no effect when trying to POST after editing a comment.

Gitea Version

1.21.11+9-g0e20ccfe32

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

None

Originally created by @bilogic on GitHub (Apr 26, 2024). Originally assigned to: @wxiaoguang on GitHub. ### Description I often use `Ctrl` + `Enter` when saving comments, but it only works when creating a new comment/issue, has no effect when trying to POST after editing a comment. ### Gitea Version 1.21.11+9-g0e20ccfe32 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? docker ### Database None
GiteaMirror added the type/bug label 2025-11-02 10:24:57 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Apr 26, 2024):

We will get this support in 1.22 , but I guess I won't backport it to 1.21 since it would cause some non-bugfix changes.

Related: [Feature Request] Add "Ctrl+Enter" posting of messages for all textareas #14843

@wxiaoguang commented on GitHub (Apr 26, 2024): We will get this support in 1.22 , but I guess I won't backport it to 1.21 since it would cause some non-bugfix changes. Related: [Feature Request] Add "Ctrl+Enter" posting of messages for all textareas #14843
Author
Owner

@bilogic commented on GitHub (Apr 26, 2024):

Got it, is there a 1.22 image that I can test?

@bilogic commented on GitHub (Apr 26, 2024): Got it, is there a 1.22 image that I can test?
Author
Owner

@wxiaoguang commented on GitHub (Apr 26, 2024):

Not yet at the moment. Maybe I could start coding in a few days 😄

@wxiaoguang commented on GitHub (Apr 26, 2024): Not yet at the moment. Maybe I could start coding in a few days 😄
Author
Owner

@wxiaoguang commented on GitHub (Apr 26, 2024):

A quick fix could be like this: Make Ctrl+Enter work for issue/comment edit #30720

Actually I have a complex plan for fixing the "enter" behaviors for various forms, while I think this quick fix doesn't cost much time and is good to have.


If the quick fix could be merged, then you could try it by the nightly release

@wxiaoguang commented on GitHub (Apr 26, 2024): A quick fix could be like this: Make Ctrl+Enter work for issue/comment edit #30720 Actually I have a complex plan for fixing the "enter" behaviors for various forms, while I think this quick fix doesn't cost much time and is good to have. ---- If the quick fix could be merged, then you could try it by the nightly release
Author
Owner

@wxiaoguang commented on GitHub (Apr 27, 2024):

Got it, is there a 1.22 image that I can test?

Now we have 1.22-rc1, it contains the "fix":

image

@wxiaoguang commented on GitHub (Apr 27, 2024): > Got it, is there a 1.22 image that I can test? Now we have 1.22-rc1, it contains the "fix": ![image](https://github.com/go-gitea/gitea/assets/2114189/242cb901-3887-4427-8069-720d04af6b02)
Author
Owner

@bilogic commented on GitHub (Apr 28, 2024):

Ok, found the docker image gitea/gitea:1.22.0-rc1

@bilogic commented on GitHub (Apr 28, 2024): Ok, found the docker image `gitea/gitea:1.22.0-rc1`
Author
Owner

@bilogic commented on GitHub (Apr 28, 2024):

It seems the arc-green theme was removed between 1.21.11+9-g0e20ccfe32 and 1.22.0-rc1? Anyway for me to get it back?

@bilogic commented on GitHub (Apr 28, 2024): It seems the `arc-green` theme was removed between `1.21.11+9-g0e20ccfe32` and `1.22.0-rc1`? Anyway for me to get it back?
Author
Owner

@wxiaoguang commented on GitHub (Apr 28, 2024):

It is still there, only renamed.

There is a breaking change for it: https://github.com/go-gitea/gitea/releases

Rename the default themes to gitea-light, gitea-dark, gitea-auto (https://github.com/go-gitea/gitea/pull/27419)

The renaming is done to make it easier to support more user's custom themes.

@wxiaoguang commented on GitHub (Apr 28, 2024): It is still there, only renamed. There is a breaking change for it: https://github.com/go-gitea/gitea/releases > Rename the default themes to gitea-light, gitea-dark, gitea-auto (https://github.com/go-gitea/gitea/pull/27419) The renaming is done to make it easier to support more user's custom themes.
Author
Owner

@bilogic commented on GitHub (Apr 28, 2024):

How would I go about that with docker? Let me know if there is a better place to discuss this theme issue. Thank you.

@bilogic commented on GitHub (Apr 28, 2024): How would I go about that with docker? Let me know if there is a better place to discuss this theme issue. Thank you.
Author
Owner

@wxiaoguang commented on GitHub (Apr 28, 2024):

How would I go about that with docker?

Sorry, I didn't get the point of "How would I go about that with docker?". Do you mean you didn't see it?

Maybe there is something in your app.ini, check the THEME related keys.


Maybe there are some legacy options generated by old Gitea, now you could simply make THEMES to be empty, then all themes could be used.

@wxiaoguang commented on GitHub (Apr 28, 2024): > How would I go about that with docker? Sorry, I didn't get the point of "How would I go about that with docker?". Do you mean you didn't see it? Maybe there is something in your `app.ini`, check the `THEME` related keys. ---- Maybe there are some legacy options generated by old Gitea, now you could simply make `THEMES` to be empty, then all themes could be used.
Author
Owner

@bilogic commented on GitHub (Apr 28, 2024):

image

I'm using docker, so I assume everything gets overwritten?
The above are all that I can see in 1.22, and none of them shows what I used previously.

@bilogic commented on GitHub (Apr 28, 2024): ![image](https://github.com/go-gitea/gitea/assets/946010/f809e2b7-8d91-4ea1-aff5-fc5589614195) I'm using docker, so I assume everything gets overwritten? The above are all that I can see in 1.22, and none of them shows what I used previously.
Author
Owner

@wxiaoguang commented on GitHub (Apr 28, 2024):

I'm using docker, so I assume everything gets overwritten?
The above are all that I can see in 1.22, and none of them shows what I used previously.

Hmm, do you mean that you still need the "green dark theme" which is named "arc-green" ?

There is one change for the dark theme: Recolor dark theme to blue shade (#29283)

If I understand correctly, the "arc dark theme" was completely rewritten by #27419 / #29283, the color change proposal is in #27097, so there is no equivalent arc-green in 1.22 after #29283. Maybe @silverwind (the author of these issue/PR) knows more.

@wxiaoguang commented on GitHub (Apr 28, 2024): > I'm using docker, so I assume everything gets overwritten? > The above are all that I can see in 1.22, and none of them shows what I used previously. Hmm, do you mean that you still need the "green dark theme" which is named "arc-green" ? There is one change for the dark theme: Recolor dark theme to blue shade (#29283) If I understand correctly, the "arc dark theme" was completely rewritten by #27419 / #29283, the color change proposal is in #27097, so there is no equivalent arc-green in 1.22 after #29283. Maybe @silverwind (the author of these issue/PR) knows more.
Author
Owner

@bilogic commented on GitHub (Apr 28, 2024):

Yes, I'm looking for the arc-green theme. All the referenced conversations are locked. But thanks!

@silverwind Personally, the arc-green matches the green gitea logo better even tho I understand this is trying to achieve consistency between dark/light. But why the need to be "consistent"? In our setup, we never toggle gitea to light. It would be great if there is a way to get back arc-green.

@bilogic commented on GitHub (Apr 28, 2024): Yes, I'm looking for the `arc-green` theme. All the referenced conversations are locked. But thanks! @silverwind Personally, the `arc-green` matches the green gitea logo better even tho I understand this is trying to achieve consistency between dark/light. But why the need to be "consistent"? In our setup, we never toggle gitea to light. It would be great if there is a way to get back `arc-green`.
Author
Owner

@lunny commented on GitHub (Apr 28, 2024):

Yes, I'm looking for the arc-green theme. All the referenced conversations are locked. But thanks!

@silverwind Personally, the arc-green matches the green gitea logo better even tho I understand this is trying to achieve consistency between dark/light. But why the need to be "consistent"? In our setup, we never toggle gitea to light. It would be great if there is a way to get back arc-green.

Maybe that theme could be copied as a third-party theme.

@lunny commented on GitHub (Apr 28, 2024): > Yes, I'm looking for the `arc-green` theme. All the referenced conversations are locked. But thanks! > > @silverwind Personally, the `arc-green` matches the green gitea logo better even tho I understand this is trying to achieve consistency between dark/light. But why the need to be "consistent"? In our setup, we never toggle gitea to light. It would be great if there is a way to get back `arc-green`. Maybe that theme could be copied as a third-party theme.
Author
Owner

@wxiaoguang commented on GitHub (Apr 28, 2024):

I could share some of my opinions about this decision:

  1. there are many buttons/labels/messages in green (no matter which theme is used), the green elements usually mean "success". So the default green color used by "arc-green" as primary color would confuse users.
  2. there are more users affected by green/red blindness than blue.
@wxiaoguang commented on GitHub (Apr 28, 2024): I could share some of my opinions about this decision: 1. there are many buttons/labels/messages in green (no matter which theme is used), the green elements usually mean "success". So the default green color used by "arc-green" as primary color would confuse users. 2. there are more users affected by green/red blindness than blue.
Author
Owner

@bilogic commented on GitHub (Apr 28, 2024):

Maybe that theme could be copied as a third-party theme.

Yea, this would be great, any instructions on how to get it back in my docker setup?

  1. there are many buttons/labels/messages in green (no matter which theme is used), the green elements usually mean "success". So the default green color used by "arc-green" as primary color would confuse users.
  2. there are more users affected by green/red blindness than blue.

Thanks for the insight. Maybe a blue gitea icon? 🤭

Jokes and considerations aside, and this is just my personal preference: I find the arc-green "cleaner" as compared to the mix of blue/green.

I guess this comes from my approach of having subtle success notifications, but loud failure alerts. As my reporting mechanisms may sometimes break, success notifications are necessary to assure that it is not broken.

@bilogic commented on GitHub (Apr 28, 2024): > Maybe that theme could be copied as a third-party theme. Yea, this would be great, any instructions on how to get it back in my docker setup? > 1. there are many buttons/labels/messages in green (no matter which theme is used), the green elements usually mean "success". So the default green color used by "arc-green" as primary color would confuse users. > 2. there are more users affected by green/red blindness than blue. Thanks for the insight. Maybe a blue gitea icon? 🤭 Jokes and considerations aside, and this is just my personal preference: I find the `arc-green` "cleaner" as compared to the mix of blue/green. I guess this comes from my approach of having subtle success notifications, but loud failure alerts. As my reporting mechanisms may sometimes break, success notifications are necessary to assure that it is not broken.
Author
Owner

@lunny commented on GitHub (Apr 28, 2024):

You can try to follow the below steps to add a custom theme

[UI]
THEMES=arc-green,gitea-auto,gitea-light,gitea-dark
  • Restart the Gitea container
@lunny commented on GitHub (Apr 28, 2024): You can try to follow the below steps to add a custom theme - Download https://github.com/go-gitea/gitea/blob/release/v1.21/web_src/css/themes/theme-arc-green.css - Put it into `/data/gitea/public/assets/css/` - Edit `/data/gitea/conf/app.ini` to add ```ini [UI] THEMES=arc-green,gitea-auto,gitea-light,gitea-dark ``` - Restart the Gitea container
Author
Owner

@wxiaoguang commented on GitHub (Apr 28, 2024):

Download https://github.com/go-gitea/gitea/blob/release/v1.21/web_src/css/themes/theme-arc-green.css

Actually I wouldn't recommend to do so if end users do not want to spend enough time on customizing. The problem is that the theme variables (always) change between versions. So a 1.21 theme might not work well in 1.22 (some parts work, while some parts don't)

If end users would like to spend enough time on customizing, the customized theme should base on the related release's theme variables.

Edit /data/gitea/conf/app.ini to add

No need to do so anymore after #30625, all themes are automatically discovered.

@wxiaoguang commented on GitHub (Apr 28, 2024): > Download https://github.com/go-gitea/gitea/blob/release/v1.21/web_src/css/themes/theme-arc-green.css Actually I wouldn't recommend to do so if end users do not want to spend enough time on customizing. The problem is that the theme variables (always) change between versions. So a 1.21 theme might not work well in 1.22 (some parts work, while some parts don't) If end users would like to spend enough time on customizing, the customized theme should base on the related release's theme variables. > Edit `/data/gitea/conf/app.ini` to add No need to do so anymore after #30625, all themes are automatically discovered.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12918