forked from gitea/gitea
1
0
Fork 0
gitea/web_src
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
..
fomantic Fix Fomantic UI's `touchstart` fastclick, always use `click` for click events () () 2023-02-28 17:53:45 -05:00
js Use async await to fix empty quote reply at first time () () 2023-03-02 16:36:21 -06:00
less Add word-break to sidebar-item-link () () 2023-02-27 15:59:36 -05:00
svg Add Chef package registry () 2023-02-06 09:49:21 +08:00