-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Remove jQuery from the "quick submit" handler #29200
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
Conversation
- Switched to plain JavaScript - Tested the quick submit functionality and it works as before Signed-off-by: Yarden Shoham <[email protected]>
Hope you tested it 😆 |
@@ -8,7 +8,7 @@ export function handleGlobalEnterQuickSubmit(target) { | |||
|
|||
// here use the event to trigger the submit event (instead of calling `submit()` method directly) | |||
// otherwise the `areYouSure` handler won't be executed, then there will be an annoying "confirm to leave" dialog | |||
form.dispatchEvent(new SubmitEvent('submit', {bubbles: true, cancelable: true})); | |||
form.dispatchEvent(new SubmitEvent('submit')); |
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.
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.
Yes, but does that also apply to SubmitEvent
? Neither MDN nor the HTML spec seem to give an answer, so we may need to test it. Might also be good to check what jQuery did internally and just do that.
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.
This reverts commit cf8d365.
…29223) Partially related to #29200 and fix other potential bugs. Co-authored-by: Giteabot <[email protected]>
…o-gitea#29223) Partially related to go-gitea#29200 and fix other potential bugs. Co-authored-by: Giteabot <[email protected]>
- Switched to plain JavaScript - Tested the quick submit functionality and it works as before # Demo using JavaScript without jQuery  --------- Signed-off-by: Yarden Shoham <[email protected]>
…o-gitea#29223) Partially related to go-gitea#29200 and fix other potential bugs. Co-authored-by: Giteabot <[email protected]>
- Switched to plain JavaScript - Tested the quick submit functionality and it works as before # Demo using JavaScript without jQuery  --------- Signed-off-by: Yarden Shoham <[email protected]> (cherry picked from commit d8d4b33)
Automatically locked because of our CONTRIBUTING guidelines |
Demo using JavaScript without jQuery