mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 05:50:14 +08:00
FIX: while header drop down is dropped, header is in front
This commit is contained in:
parent
fd5dde4ab5
commit
7ae72dc2ff
|
@ -6,6 +6,9 @@
|
|||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
|
||||
var originalZIndex;
|
||||
|
||||
export default Discourse.View.extend({
|
||||
tagName: 'header',
|
||||
classNames: ['d-header', 'clearfix'],
|
||||
|
@ -18,8 +21,17 @@ export default Discourse.View.extend({
|
|||
$li = $target.closest('li'),
|
||||
$ul = $target.closest('ul'),
|
||||
$html = $('html'),
|
||||
$header = $('header'),
|
||||
replyZIndex = parseInt($('#reply-control').css('z-index'), 10),
|
||||
self = this;
|
||||
|
||||
|
||||
originalZIndex = originalZIndex || $('header').css('z-index');
|
||||
|
||||
if(replyZIndex > 0) {
|
||||
$header.css("z-index", replyZIndex + 1);
|
||||
}
|
||||
|
||||
var controller = self.get('controller');
|
||||
if(controller && !controller.isDestroyed){
|
||||
controller.set('visibleDropdown', elementId);
|
||||
|
@ -38,6 +50,7 @@ export default Discourse.View.extend({
|
|||
}
|
||||
|
||||
var hideDropdown = function() {
|
||||
$header.css("z-index", originalZIndex);
|
||||
$dropdown.fadeOut('fast');
|
||||
$li.removeClass('active');
|
||||
$html.data('hide-dropdown', null);
|
||||
|
|
Loading…
Reference in New Issue
Block a user