diff options
author | Fabian Schneider <fabbbbbi+git@googlemail.com> | 2018-03-31 14:10:16 +0300 |
---|---|---|
committer | Fabian Schneider <fabbbbbi+git@googlemail.com> | 2018-04-08 12:00:25 +0300 |
commit | d2482f15e19695e2f89284d9a0219c6b4b4f401c (patch) | |
tree | 663d14b98a2fc9946c5d75ffc476e4850e5bdf32 /app | |
parent | dd552d06f6e39d5e6138a33bd7c1bffb2d3dbb1d (diff) |
Fix template selector menu visibility
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/blob/file_template_mediator.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/blob/file_template_selector.js | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/blob/file_template_mediator.js b/app/assets/javascripts/blob/file_template_mediator.js index 030ca1907e5..ff1cbcad145 100644 --- a/app/assets/javascripts/blob/file_template_mediator.js +++ b/app/assets/javascripts/blob/file_template_mediator.js @@ -94,7 +94,7 @@ export default class FileTemplateMediator { const hash = urlPieces[1]; if (hash === 'preview') { this.hideTemplateSelectorMenu(); - } else if (hash === 'editor') { + } else if (hash === 'editor' && !this.typeSelector.isHidden()) { this.showTemplateSelectorMenu(); } }); diff --git a/app/assets/javascripts/blob/file_template_selector.js b/app/assets/javascripts/blob/file_template_selector.js index e52cf249f3a..02228434a29 100644 --- a/app/assets/javascripts/blob/file_template_selector.js +++ b/app/assets/javascripts/blob/file_template_selector.js @@ -32,6 +32,10 @@ export default class FileTemplateSelector { } } + isHidden() { + return this.$wrapper.hasClass('hidden'); + } + getToggleText() { return this.$dropdownToggleText.text(); } |