diff --git a/app/assets/javascripts/discourse/components/hamburger-menu.js.es6 b/app/assets/javascripts/discourse/components/hamburger-menu.js.es6
index 9dc957ed8c0..32e7d194a3f 100644
--- a/app/assets/javascripts/discourse/components/hamburger-menu.js.es6
+++ b/app/assets/javascripts/discourse/components/hamburger-menu.js.es6
@@ -7,14 +7,21 @@ export default Ember.Component.extend({
visibilityChanged: function(){
if(this.get("visible")) {
$('html').on('click.close-humburger', (e) => {
+
+ if (this.get('isDestroyed')) {
+ $('html').off('click.close-humburger');
+ return true;
+ }
+
const $target = $(e.target);
if ($target.closest('.dropdown.categories').length > 0) {
return;
}
- console.log(e.toElement || e.relatedTarget || e.target);
+
this.set("visible", false);
$('html').off('click.close-humburger');
return true;
+
});
} else {
$('html').off('click.close-humburger');
diff --git a/app/assets/javascripts/discourse/templates/components/hamburger-menu.hbs b/app/assets/javascripts/discourse/templates/components/hamburger-menu.hbs
index b85ffb0b92c..7cef85af937 100644
--- a/app/assets/javascripts/discourse/templates/components/hamburger-menu.hbs
+++ b/app/assets/javascripts/discourse/templates/components/hamburger-menu.hbs
@@ -2,77 +2,78 @@
-
- {{#if currentUser.staff}}
+
+
+ {{#if currentUser.staff}}
+ -
+ {{#link-to "admin" class="admin-link"}}
+ {{fa-icon "wrench"}} {{i18n 'admin_title'}}
+ {{/link-to}}
+
+ -
+ {{#link-to "adminFlags" class="flagged-posts-link"}}
+ {{fa-icon "flag"}} {{i18n 'flags_title'}}
+ {{#if currentUser.site_flagged_posts_count}}
+ {{currentUser.site_flagged_posts_count}}
+ {{/if}}
+ {{/link-to}}
+
+ {{/if}}
-
- {{#link-to "admin" class="admin-link"}}
- {{fa-icon "wrench"}} {{i18n 'admin_title'}}
+ {{#link-to "discovery.latest" class="latest-topics-link"}}
+ {{i18n 'filters.latest.title.zero'}}
{{/link-to}}
+ {{#if siteSettings.enable_badges}}
+ -
+ {{#link-to 'badges' class="badge-link"}}{{i18n 'badges.title'}}{{/link-to}}
+
+ {{/if}}
+
+ {{#if siteSettings.enable_user_directory}}
+ - {{#link-to 'users' class="user-directory-link"}}{{i18n "directory.title"}}{{/link-to}}
+ {{/if}}
+
+ {{#if currentUser.show_queued_posts}}
+ -
+ {{#link-to 'queued-posts'}}
+ {{i18n "queue.title"}}
+ {{#if currentUser.post_queue_new_count}}
+ {{currentUser.post_queue_new_count}}
+ {{/if}}
+ {{/link-to}}
+
+ {{/if}}
+
+ {{plugin-outlet "site-map-links"}}
+
+ {{#if showKeyboardShortcuts}}
+ - {{i18n 'keyboard_shortcuts_help.title'}}
+ {{/if}}
-
- {{#link-to "adminFlags" class="flagged-posts-link"}}
- {{fa-icon "flag"}} {{i18n 'flags_title'}}
- {{#if currentUser.site_flagged_posts_count}}
- {{currentUser.site_flagged_posts_count}}
- {{/if}}
- {{/link-to}}
+ {{i18n 'faq'}}
- {{/if}}
- -
- {{#link-to "discovery.latest" class="latest-topics-link"}}
- {{i18n 'filters.latest.title.zero'}}
- {{/link-to}}
-
- {{#if siteSettings.enable_badges}}
-
- {{#link-to 'badges' class="badge-link"}}{{i18n 'badges.title'}}{{/link-to}}
+ {{#link-to 'about' class="about-link"}}{{i18n 'about.simple_title'}}{{/link-to}}
- {{/if}}
+ {{#if showMobileToggle}}
+ - {{boundI18n mobileViewLinkTextKey}}
+ {{/if}}
- {{#if siteSettings.enable_user_directory}}
- - {{#link-to 'users' class="user-directory-link"}}{{i18n "directory.title"}}{{/link-to}}
- {{/if}}
-
- {{#if currentUser.show_queued_posts}}
- -
- {{#link-to 'queued-posts'}}
- {{i18n "queue.title"}}
- {{#if currentUser.post_queue_new_count}}
- {{currentUser.post_queue_new_count}}
- {{/if}}
- {{/link-to}}
-
- {{/if}}
-
- {{plugin-outlet "site-map-links"}}
-
- {{#if showKeyboardShortcuts}}
- - {{i18n 'keyboard_shortcuts_help.title'}}
- {{/if}}
- -
- {{i18n 'faq'}}
-
- -
- {{#link-to 'about' class="about-link"}}{{i18n 'about.simple_title'}}{{/link-to}}
-
- {{#if showMobileToggle}}
- - {{boundI18n mobileViewLinkTextKey}}
- {{/if}}
-
- {{plugin-outlet "site-map-links-last"}}
-
-
- {{#if categories}}
-
- -
- {{#link-to "discovery.categories" class="categories-link"}}{{i18n 'filters.categories.title'}}{{/link-to}}
-
-
- {{#each categories as |c|}}
- {{hamburger-category category=c}}
- {{/each}}
+ {{plugin-outlet "site-map-links-last"}}
- {{/if}}
-
+ {{#if categories}}
+
+ -
+ {{#link-to "discovery.categories" class="categories-link"}}{{i18n 'filters.categories.title'}}{{/link-to}}
+
+
+ {{#each categories as |c|}}
+ {{hamburger-category category=c}}
+ {{/each}}
+
+ {{/if}}
+
+
{{/if}}
diff --git a/app/assets/stylesheets/common/base/hamburger.scss b/app/assets/stylesheets/common/base/hamburger.scss
index ca61474f796..e3ffe127868 100644
--- a/app/assets/stylesheets/common/base/hamburger.scss
+++ b/app/assets/stylesheets/common/base/hamburger.scss
@@ -5,7 +5,7 @@
background-color: $secondary;
z-index: 1002;
height: 100%;
- overflow: auto;
+ overflow: none;
transition: 0.3s ease-in-out;
@include transform(translateX(0));
@@ -17,8 +17,23 @@
float: right;
color: dark-light-choose(scale-color($header_primary, $lightness: 50%), $header_primary);
font-size: 1.5em;
- margin-right: 0.5em;
+ margin-right: -10px;
margin-top: 0.1em;
+ padding: 0 4 4 4px;
+ z-index: 9999;
+ }
+
+ .hamburger-header {
+ position: absolute;
+ right: 20px;
+ }
+
+ .hamburger-body {
+ overflow-y: auto;
+ overflow-x: hidden;
+ position: absolute;
+ top: 40px;
+ bottom: 100px;
}