From 7ce77a151c6b9096558f4317d4195f227868a6d1 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 26 Jun 2015 23:16:21 +0800 Subject: [PATCH 1/2] UX: Dropdown not dismissing until next page renders. --- app/assets/javascripts/discourse/views/header.js.es6 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/javascripts/discourse/views/header.js.es6 b/app/assets/javascripts/discourse/views/header.js.es6 index 59bb77f41d8..120a0960c7a 100644 --- a/app/assets/javascripts/discourse/views/header.js.es6 +++ b/app/assets/javascripts/discourse/views/header.js.es6 @@ -60,6 +60,7 @@ export default Discourse.View.extend({ controller.set('visibleDropdown', null); } $html.off('click.d-dropdown'); + $dropdown.off('click.d-dropdown'); }; // if a dropdown is active and the user clicks on it, close it @@ -78,6 +79,10 @@ export default Discourse.View.extend({ return $(e.target).closest('.d-dropdown').length > 0 ? true : hideDropdown.apply(self); }); + $dropdown.on('click.d-dropdown', function(e) { + return $(e.target).closest('a').not('.search-link').length > 0 ? hideDropdown.apply(self) : true; + }); + $html.data('hide-dropdown', hideDropdown); return false; From 5c93188bc956e742e5ef64548d1490b719e8aaf4 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 26 Jun 2015 23:24:56 +0800 Subject: [PATCH 2/2] UX: Make category links heading take the entire width. --- app/assets/stylesheets/common/base/header.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/common/base/header.scss b/app/assets/stylesheets/common/base/header.scss index 205ef7bb288..123f46ca77d 100644 --- a/app/assets/stylesheets/common/base/header.scss +++ b/app/assets/stylesheets/common/base/header.scss @@ -238,7 +238,10 @@ &#site-map-dropdown { .heading { padding: 5px 5px 5px 0; - a {padding: 0 5px;} + a { + display: block; + padding: 0 5px; + } } }