gitea/web_src/js/features/comp
HesterG ffce336f18
Use async await to fix empty quote reply at first time (#23168)
The reason why quote reply is empty is when quote reply is clicked, it
triggers the click function on `.comment-form-reply` button, and when
the first time this function is triggered, easyMDE for the reply has not
yet initialized, so that click handler of `.quote-reply` button in
`repo-legacy.js` got an `undefined` as easyMDE, and the following lines
which put quoted reply into the easyMDE is not executed.
The workaround in this PR is to pass the replied content to
'.comment-form-reply' button if easyMDE is not yet initialized (quote
reply first clicked) and put the replied content into it the after
easyMDE is created.
Now quote reply on first click:


https://user-images.githubusercontent.com/17645053/221452823-fc699d50-1649-4af1-952e-f04fc8d2978e.mov

<br />


Update:
The above change is not appropriate as stated in the
[comment](https://github.com/go-gitea/gitea/pull/23168#issuecomment-1445562284)
Use await instead

Close #22075.
Close #23247.
2023-03-02 13:53:22 -06:00
..
ColorPicker.js JS refactors (#22227) 2022-12-24 00:03:11 +08:00
EasyMDE.js Use async await to fix empty quote reply at first time (#23168) 2023-03-02 13:53:22 -06:00
ImagePaste.js Enable spellcheck for EasyMDE, use contenteditable mode (#19776) 2022-06-29 01:52:58 +08:00
LabelEdit.js Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
MarkupContentPreview.js Use explicit jQuery import, remove unused eslint globals (#18435) 2022-01-28 21:00:11 +00:00
QuickSubmit.js move handleGlobalEnterQuickSubmit into a separate file to avoid cycle-import (#20679) 2022-08-05 18:08:29 +08:00
ReactionSelector.js Replace fomantic popup module with tippy.js (#20428) 2022-08-09 14:37:34 +02:00
SearchUserBox.js JS refactors (#22227) 2022-12-24 00:03:11 +08:00
WebHookEditor.js Refactor hiding-methods, remove jQuery show/hide, remove .hide class, remove inline style=display:none (#22950) 2023-02-19 12:06:14 +08:00