-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix duplicate project board when hitting enter
key
#27746
Conversation
@@ -193,20 +193,6 @@ export function initRepoProject() { | |||
const url = $(this).data('url'); | |||
createNewColumn(url, columnTitle, projectColorInput); | |||
}); | |||
|
|||
$('.new-project-column').on('input keyup', (e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why input
event is also removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not working. The input
event is to enable/disable the confirm
button. But the confirm
button is not disabled at the first place. We don't use this kind of enable/disable attribute in other buttons either. So I removed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The frontend and backend are both introduced in the PR that implements the Project
feature. So It has some personal code style. As I said in the description, It would be great if this part of frontend code is refactored to align other POST forms that we used in Gitea.
I was unable to create a backport for 1.20. @lng2020, please send one manually. 🍵
|
When hitting the `enter` key to create a new project column, the request is sent twice because the `submit` event and `key up` event are both triggered. Probably a better solution is to rewrite these parts of the code to avoid using native jQuery but reuse the `form-fetch-action` class. But it's beyond my ability.
Backport #27746 by @lng2020 When hitting the `enter` key to create a new project column, the request is sent twice because the `submit` event and `key up` event are both triggered. Probably a better solution is to rewrite these parts of the code to avoid using native jQuery but reuse the `form-fetch-action` class. But it's beyond my ability. Co-authored-by: Nanguan Lin <[email protected]>
* giteaofficial/main: Do not force creation of _cargo-index repo on publish (go-gitea#27266) Upgrade to [email protected] (go-gitea#27756) Fix incorrect "tab" parameter for repo search sub-template (go-gitea#27755) Fix label render containing invalid HTML (go-gitea#27752) Fix duplicate project board when hitting `enter` key (go-gitea#27746) Fix `link-action` redirect network error (go-gitea#27734)
When hitting the `enter` key to create a new project column, the request is sent twice because the `submit` event and `key up` event are both triggered. Probably a better solution is to rewrite these parts of the code to avoid using native jQuery but reuse the `form-fetch-action` class. But it's beyond my ability.
When hitting the
enter
key to create a new project column, the request is sent twice because thesubmit
event andkey up
event are both triggered.Probably a better solution is to rewrite these parts of the code to avoid using native jQuery but reuse the
form-fetch-action
class. But it's beyond my ability.