Changes may be lost warning when creating MR from Web IDE

If you make a change and select Create a new branch and merge request when committing a scary warning is shown. This warning shouldn't be shown because the changes have been committed.

Steps to reproduce

  1. Open the Web IDE
  2. Change a file
  3. Add a commit message and select "Create a new branch and merge request"
  4. Click commit

What is the current bug behavior?

A scary warning is needlessly shown:

Changes you made may not be saved

What is the expected correct behavior?

Warning should not be shown and I should be taken directly to the merge request compose interface.

Relevant logs and/or screenshots

20180412_screenshot_3

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)