jack2
2019 年 12 月 20 日午前 11:05
1
How to reproduce:
Go to one of your post and click Edit to open the composer. Don’t type anything.
Press the Esc key => as expected, the composer disappears completely (it isn’t minimized, because the post hasn’t been modified).
Refresh the browser page => the composer comes back.
In step 2, if you click the Cancel button instead of pressing the Esc key, the behavior is correct, i.e. the composer doesn’t come back after browser refresh.
「いいね!」 5
@jack2
I just did it, Yes it does exactly what you say. Not sure if it’s a bug or its suppose to do this actually.
「いいね!」 3
j.jaffeux
(Joffrey Jaffeux)
2020 年 3 月 29 日午前 8:46
4
私はもうこの問題を再現できません。try.discourse.org でまだ再現できますか?
jack2
2020 年 3 月 29 日午前 9:32
5
はい、try.discourse.org で再現しました。
待って!これはランダムです!時々発生しません。
j.jaffeux
(Joffrey Jaffeux)
2020 年 3 月 29 日午前 9:34
6
一貫した再現手順は見つかりましたか?修正のアイデアはありますが、一貫した再現手順がある方が望ましいです。よろしくお願いいたします。
「いいね!」 1
j.jaffeux
(Joffrey Jaffeux)
2020 年 3 月 29 日午前 9:39
8
いいね!なるほど、私の修正案がたぶん機能しそうですね。本当にありがとうございます
「いいね!」 3
j.jaffeux
(Joffrey Jaffeux)
2020 年 3 月 29 日午後 12:39
9
予想よりもはるかに複雑でした。これで解決すると思います:
master ← jjaffeux:draft-escape-fix
closed 06:41AM - 30 Mar 20 UTC
This fix will also make sure the bootbox will be correctly shown when using esca… pe.
Test cases:
- edit post, wait for draft check, escape => should totally hide composer
- edit post, add a char, escape => should show bootbox, and reduce or hide depending on choice
Same behavior is expected when pressing on cancel.
複数のレビューを依頼しましたが、マージまで時間がかかるかもしれません。詳しい再現手順をありがとうございます
「いいね!」 5
j.jaffeux
(Joffrey Jaffeux)
2020 年 3 月 30 日午前 6:44
10
少しの更新です。PR をクローズしました。修正は機能していましたが、より上位レベルで修正を試みる予定です。
時間がかかるかもしれません
「いいね!」 4
sam
(Sam Saffron)
2020 年 3 月 31 日午前 12:51
11
この修正を行いました:
committed 12:49AM - 31 Mar 20 UTC
When editing a post we were incorrectly saving a draft prior to user typing
Thi… s caused a bloat in the amount of drafts saved per user and inconsistency
around behavior of "escape" button.
It also lead to lots of warnings about draft conflicts when copying stuff
between posts.
The code is improved to use promises more appropriately, however further
changes are needed to clean up internals so methods consistently return
promises.
Too many methods in the controller sometimes return a promise and sometimes
an object. Long term the methods will become async and all of this will be
corrected.
このファイルは非常に複雑で @eviltrout さん、async のサポートが導入されるまで待ちきれません。多くのメソッドが、あるときは Promise を返し、別のときはオブジェクトを返すため、挙動を推測することが非常に困難だからです。
当面は、いくつかの Promise と迂回処理を導入し、編集ボタンをクリックした直後に下書きを保存しないようにしました。これにより、N 件の返信から本文(OP)へテキストをコピーする作業が非常に複雑で面倒になり、@supermathie さんも困っていました。
「いいね!」 7
これで、私が感じていた多くのフラストレーションの理由がわかりました
「いいね!」 4
j.jaffeux
(Joffrey Jaffeux)
クローズされました:
2020 年 4 月 4 日午前 2:57
13
このトピックは、最後の返信から 4 日後に自動的に閉鎖されました。新しい返信は受け付けられません。