Authored by 沈志敏

fix bug

... ... @@ -7,6 +7,7 @@
var $ = require('yoho-jquery');
var $nav = $('.category-nav'),
$search = $('#search-input'),
$categoryContainer = $('.category-container'),
$contents = $categoryContainer.children('.content'),
$subLevelItem = $categoryContainer.find('.sub-level li'),
... ... @@ -14,7 +15,13 @@ var $nav = $('.category-nav'),
require('../common');
$('#search-input').focus(function() {
function resetHeight() {
var h = document.body.scrollHeight - $search.outerHeight() - $nav.outerHeight();
$contents.height(h);
}
resetHeight();
$search.focus(function() {
$(this).blur();
});
$nav.on('contextmenu', function() {
... ...
... ... @@ -77,7 +77,10 @@
}
.content {
background: #f8f8f8;
overflow: hidden;
position: relative;
&.hide {
display: none;
}
... ... @@ -87,7 +90,6 @@
float: left;
box-sizing: border-box;
width: 45%;
background: #f8f8f8;
> li {
height: 89px;
... ... @@ -108,10 +110,13 @@
}
.sub-level-container {
float: left;
position: absolute;
right: 0;
overflow-x: auto;
box-sizing: border-box;
background: #fff;
width: 55%;
height: 100%;
}
.sub-level {
... ...