-
Dmitriy Zaporozhets authored
Fix Markdown preview not working in Edit Milestone page ### What does this MR do? This MR removes the automatic Zen Mode URL update when a hash is present and makes Markdown preview work again in the Edit Milestone page. I think the intent was to make it possible to link to a full-screen edit with a URL (e.g. http://foo/bar/issues/1/edit#fullscreen), but I don't this has ever worked. Perhaps a future MR can support this. ### Why was this MR needed? A JavaScript error would be seen in the Milestone Edit page: ```javascript Uncaught error, unrecognized expression: $('.zennable input[type=checkbox]##md-preview-holder') ``` In the Milestone Edit page, apparently the use of the hash `#md-preview-holder` causes the Zen Mode JavaScript to attempt to parse the hash for the `fullscreen_` prefix and look up the checkbox based on a unknown ID. ### Are there points in the code the reviewer needs to double check? If we want to keep this hash update, an alternative fix is to add an `if` check in the beginning of `checkboxFromLocationHash`: ```coffeescript if (window.location.hash.indexOf('#' + ZenMode.fullscreen_prefix) == -1) return null ``` ### What are the relevant issue numbers? * Closes #1687 * Closes https://github.com/gitlabhq/gitlabhq/issues/9325 See merge request !711
8ea443b6
To find the state of this project's repository at the time of any of these versions, check out
the tags.