Loss of input text on comments after preview
Summary
Clicking the markdown formatting button on the upper left corner of the text area is not equivalent to editing the text. There are situations where moving to the preview window and back causes loss of input text.
I can reproduce this on the issue comments only.
Steps to reproduce
- Add some text to the issue comment
- Select it
- Click any of the formatting buttons on the top-right and verify the text changes correctly
- Click the preview tab and verify the preview matches the new text (from point 3)
- Return to the "Write" tab. Verify the change is lost and the text return to the version in point 1
Example Project
N/A
What is the current bug behavior?
On previewing issue comments, the text modifications from formatting buttons are lost when toggling the preview mode.
What is the expected correct behavior?
Keep the changes when toggling the preview.
Relevant logs and/or screenshots
I can reproduce this on any input text and all formatting buttons.
Output of checks
This was reproduced on a local installation, but This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Proxy: no Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknown
GitLab information Version: 10.4.2-ee Revision: 30275e2 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.5