fixed Chrome 下 focus 会使位置偏移

This commit is contained in:
Van 2014-09-26 17:58:54 +08:00
parent a76e963c1b
commit 5143511893
5 changed files with 19 additions and 11 deletions

View File

@ -263,6 +263,7 @@ ul {
background-color: #FFF; background-color: #FFF;
color: #555555; color: #555555;
width: 100%; width: 100%;
margin: 0;
} }
.bottom-window-group .notification, .bottom-window-group .notification,

View File

@ -200,7 +200,7 @@ var hotkeys = {
if ($(".footer .ico-restore:eq(1)").css("display") === "inline") { if ($(".footer .ico-restore:eq(1)").css("display") === "inline") {
// 当底部最小化时 // 当底部最小化时
$(".bottom-window-group").css("top", "100%"); $(".bottom-window-group").css("top", "100%").hide();
} }
} }

View File

@ -210,12 +210,12 @@ var wide = {
}); });
}, },
_initLayout: function () { _initLayout: function () {
var mainH = $(window).height() - $(".menu").height() - $(".footer").height() - 2, var mainH = $(window).height() - $(".menu").height() - $(".footer").height() - 1,
bottomH = Math.floor(mainH * 0.3); bottomH = Math.floor(mainH * 0.3);
$(".content").height(mainH); $(".content").height(mainH);
$(".side .tabs-panel").height(mainH - 20); $(".side .tabs-panel").height(mainH - 20);
$(".bottom-window-group .output, notification").height(bottomH - 24); $(".bottom-window-group .output").height(bottomH - 27);
$(".bottom-window-group .notification, .bottom-window-group .search").height(bottomH - 20); $(".bottom-window-group .notification, .bottom-window-group .search").height(bottomH - 20);
}, },
_initBottomWindowGroup: function () { _initBottomWindowGroup: function () {

View File

@ -77,8 +77,8 @@ var windows = {
$it.attr("style", ""); $it.attr("style", "");
var bottomH = $(".content").height(); var bottomH = $(".content").height();
$(".bottom-window-group .output, notification").height(bottomH - 23); $(".bottom-window-group .output").height(bottomH - 27);
$(".bottom-window-group .notification, .bottom-window-group .search").height(bottomH - 19); $(".bottom-window-group .notification, .bottom-window-group .search").height(bottomH - 20);
$it.addClass("bottom-window-group-max"); $it.addClass("bottom-window-group-max");
} }
@ -96,7 +96,7 @@ var windows = {
$it.removeClass("bottom-window-group-max").attr("style", ""); $it.removeClass("bottom-window-group-max").attr("style", "");
var bottomH = $it.height(); var bottomH = $it.height();
$(".bottom-window-group .output, notification").height(bottomH - 24); $(".bottom-window-group .output").height(bottomH - 27);
$(".bottom-window-group .notification, .bottom-window-group .search").height(bottomH - 20); $(".bottom-window-group .notification, .bottom-window-group .search").height(bottomH - 20);
$it.animate({ $it.animate({
@ -109,8 +109,17 @@ var windows = {
editorDatas[i].editor.setSize("100%", $(".edit-panel").height() - $(".edit-panel .tabs").height()); editorDatas[i].editor.setSize("100%", $(".edit-panel").height() - $(".edit-panel .tabs").height());
} }
$it.show();
$(".footer .ico-restore:eq(1)").hide(); $(".footer .ico-restore:eq(1)").hide();
}); });
if ($(".footer .ico-restore:eq(0)").css("display") === "inline") {
// 当文件树最小化时
$it.css({
"width": "100%",
"left": "0"
});
}
}, },
restoreSide: function () { restoreSide: function () {
$(".side").animate({ $(".side").animate({
@ -132,7 +141,7 @@ var windows = {
editorDatas[i].editor.setSize("100%", $(".content").height() - $(".edit-panel .tabs").height()); editorDatas[i].editor.setSize("100%", $(".content").height() - $(".edit-panel .tabs").height());
} }
$(".bottom-window-group").css("top", "100%"); $(".bottom-window-group").css("top", "100%").hide();
$(".footer .ico-restore:eq(1)").show(); $(".footer .ico-restore:eq(1)").show();
}, },
minSide: function () { minSide: function () {
@ -185,7 +194,7 @@ var windows = {
"left": "0px", "left": "0px",
"width": "100%", "width": "100%",
"z-index": "8" "z-index": "8"
}); }).show();
if ($(".footer .ico-restore:eq(0)").css("display") === "inline") { if ($(".footer .ico-restore:eq(0)").css("display") === "inline") {
// 当文件最小化时 // 当文件最小化时

View File

@ -150,9 +150,7 @@
</div> </div>
</div> </div>
<div class="tabs-panel"> <div class="tabs-panel">
<div data-index="output"> <div data-index="output"><textarea class="output"></textarea></div>
<textarea class="output"></textarea>
</div>
<div class="fn-none" data-index="search"> <div class="fn-none" data-index="search">
<div class="search" tabindex="-1"></div> <div class="search" tabindex="-1"></div>
</div> </div>