Make submit event code work with both jQuery event and native event (#29223)

Partially related to #29200 and fix other potential bugs.

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
wxiaoguang 2024-02-18 04:48:10 +08:00 committed by GitHub
parent 5e1bf3efe2
commit 658cbddbfb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -40,7 +40,7 @@ export function initCommonIssueListQuickGoto() {
$form.on('submit', (e) => {
// if there is no goto button, or the form is submitted by non-quick-goto elements, submit the form directly
let doQuickGoto = !isElemHidden($goto);
const submitter = submitEventSubmitter(e.originalEvent);
const submitter = submitEventSubmitter(e);
if (submitter !== $form[0] && submitter !== $input[0] && submitter !== $goto[0]) doQuickGoto = false;
if (!doQuickGoto) return;