forgejo/web_src/js
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
..
components Fix incorrect checkbox behaviors in the dashboard repolist's filter (#23147) 2023-03-01 10:22:14 +08:00
features Use async await to fix empty quote reply at first time (#23168) 2023-03-02 13:53:22 -06:00
markup Move helpers to be prefixed with gt- (#22879) 2023-02-13 17:59:59 +00:00
modules Add Mermaid copy button, avoid unnecessary tooltip hide (#22225) 2022-12-25 18:17:48 +01:00
standalone
test Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 2023-02-06 12:09:18 -06:00
utils Fix the show/hide methods for string selector (#23042) 2023-02-21 11:09:03 -06:00
webcomponents Introduce customized HTML elements, fix incorrect AppUrl usages in templates (#22861) 2023-02-17 22:02:20 +08:00
bootstrap.js Quick fixes monaco-editor error: "vs.editor.nullLanguage" (#21734) 2022-11-09 18:02:19 +08:00
index.js Improve AppUrl/ROOT_URL checking (#22836) 2023-02-09 11:14:45 -05:00
jquery.js
serviceworker.js
svg.js Implement actions (#21937) 2023-01-31 09:45:19 +08:00
svg.test.js Remove vitest globals (#21505) 2022-10-19 14:50:19 +08:00
utils.js Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
utils.test.js Fix links for the menus in the view file page (#22795) 2023-02-08 00:08:44 +08:00