mirror of
https://github.com/typecho/typecho.git
synced 2025-01-17 12:38:28 +01:00
fix #1361
This commit is contained in:
parent
004db7c056
commit
7ebfe82de1
@ -91,6 +91,7 @@
|
||||
|
||||
$('#typecho-nav-list ul.root').each(function () {
|
||||
const ul = $(this), nav = ul.parent();
|
||||
let focused = false;
|
||||
|
||||
ul.on('click touchend', '.parent a', function (e) {
|
||||
nav.removeClass('noexpanded').addClass('expanded');
|
||||
@ -102,6 +103,19 @@
|
||||
nav.removeClass('expanded').addClass('noexpanded');
|
||||
return false;
|
||||
}));
|
||||
|
||||
$('a', ul).focus(function () {
|
||||
ul.addClass('expanded');
|
||||
focused = true;
|
||||
}).blur(function () {
|
||||
focused = false;
|
||||
|
||||
setTimeout(function () {
|
||||
if (!focused) {
|
||||
ul.removeClass('expanded');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
if ($('.typecho-login').length == 0) {
|
||||
|
@ -170,7 +170,7 @@ select { border: 1px solid #CCC; height: 28px; }
|
||||
|
||||
.typecho-head-nav #typecho-nav-list > ul.focus .parent a { font-weight: bold; }
|
||||
|
||||
.typecho-head-nav #typecho-nav-list > ul.root:hover .child { display: block; }
|
||||
.typecho-head-nav #typecho-nav-list > ul.root:hover .child, .typecho-head-nav #typecho-nav-list > ul.root.expanded .child { display: block; }
|
||||
|
||||
.typecho-head-nav .operate { float: right; }
|
||||
|
||||
|
@ -100,7 +100,7 @@ $color-nav-child-focus: #6DA1BB;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.root:hover .child {
|
||||
&.root:hover .child, &.root.expanded .child {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user