Fix issue comment form and quick-submit (#30623)
1. Rewrite initGlobalEnterQuickSubmit (by the way, remove jQuery) 2. Fix issue comment form layout
This commit is contained in:
parent
e865de1e9d
commit
f95622cddc
7 changed files with 37 additions and 38 deletions
|
@ -9,9 +9,5 @@ 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}));
|
||||
} else {
|
||||
// if no form, then the editor is for an AJAX request, dispatch an event to the target, let the target's event handler to do the AJAX request.
|
||||
// the 'ce-' prefix means this is a CustomEvent
|
||||
target.dispatchEvent(new CustomEvent('ce-quick-submit', {bubbles: true}));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue