diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-26 14:15:17 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-05-26 14:15:17 +0000 |
commit | 8ea443b6d6a60b7d6a0a52ac35af560ac62ef8f1 (patch) | |
tree | 53dc4680fa319c47b6fb654eea718847bc31374e /spec/models/commit_spec.rb | |
parent | ebe0aef26901aee211e78b861925bbab97027aa6 (diff) | |
parent | ae552ec3158c88b6eb6d61cd4281442eff8d63b4 (diff) | |
download | gitlab-ce-8ea443b6d6a60b7d6a0a52ac35af560ac62ef8f1.tar.gz |
Merge branch 'fix-fullscreen-preview-in-milestones' into 'master'
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
Diffstat (limited to 'spec/models/commit_spec.rb')
0 files changed, 0 insertions, 0 deletions