forgejo/web_src/js
Giteabot ef8209a953
Use async await to fix empty quote reply at first time () ()
Backport 

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 .
Close .

Co-authored-by: HesterG <hestergong@gmail.com>
2023-03-02 16:36:21 -06:00
..
components Fix incorrect checkbox behaviors in the dashboard repolist's filter () () 2023-03-02 15:12:33 +08:00
features Use async await to fix empty quote reply at first time () () 2023-03-02 16:36:21 -06:00
markup Move helpers to be prefixed with gt- () 2023-02-13 17:59:59 +00:00
modules Add Mermaid copy button, avoid unnecessary tooltip hide () 2022-12-25 18:17:48 +01:00
standalone Add new JS linter rules () 2021-11-22 16:19:01 +08:00
test Use link in UI which returned a relative url but not html_url which contains an absolute url () 2023-02-06 12:09:18 -06:00
utils Fix the show/hide methods for string selector () 2023-02-21 11:09:03 -06:00
webcomponents Introduce customized HTML elements, fix incorrect AppUrl usages in templates () 2023-02-17 22:02:20 +08:00
bootstrap.js Quick fixes monaco-editor error: "vs.editor.nullLanguage" () 2022-11-09 18:02:19 +08:00
index.js Improve AppUrl/ROOT_URL checking () 2023-02-09 11:14:45 -05:00
jquery.js
serviceworker.js Fix serviceworker output file and misc improvements () 2020-05-24 08:36:40 +01:00
svg.js Implement actions () 2023-01-31 09:45:19 +08:00
svg.test.js Remove vitest globals () 2022-10-19 14:50:19 +08:00
utils.js Scoped labels () 2023-02-18 21:17:39 +02:00
utils.test.js Fix links for the menus in the view file page () 2023-02-08 00:08:44 +08:00