弹出层bug 修改

This commit is contained in:
Van 2015-01-04 11:21:44 +08:00
parent 3bdba1a2fa
commit 51f41a10d1
4 changed files with 7 additions and 15 deletions

View File

@ -35,7 +35,7 @@ var bottomGroup = {
}); });
}, },
_initFrame: function () { _initFrame: function () {
$(".bottom-window-group .output").parent().mousedown(function (event) { $(".bottom-window-group .output").parent().mouseup(function (event) {
event.stopPropagation(); event.stopPropagation();
if (event.button === 0) { // 左键 if (event.button === 0) { // 左键

View File

@ -60,7 +60,7 @@ var editors = {
new ZeroClipboard($("#copyFilePath")); new ZeroClipboard($("#copyFilePath"));
// 关闭、关闭其他、关闭所有 // 关闭、关闭其他、关闭所有
$(".edit-panel").on("mousedown", '.tabs > div', function (event) { $(".edit-panel").on("mouseup", '.tabs > div', function (event) {
event.stopPropagation(); event.stopPropagation();
if (event.button === 0) { // 左键 if (event.button === 0) { // 左键

View File

@ -23,7 +23,6 @@ var menu = {
// 点击子菜单后消失 // 点击子菜单后消失
$(".menu .frame li").click(function () { $(".menu .frame li").click(function () {
$(".frame").hide();
$(".menu > ul > li").unbind().removeClass("selected"); $(".menu > ul > li").unbind().removeClass("selected");
menu.subMenu(); menu.subMenu();
}); });
@ -110,7 +109,7 @@ var menu = {
if ($(event.target).closest(".frame").length === 1) { if ($(event.target).closest(".frame").length === 1) {
return; return;
} }
$(".frame").hide(); $(".menu .frame").hide();
$(this).find('.frame').show(); $(this).find('.frame').show();
$(".menu > ul > li").removeClass("selected"); $(".menu > ul > li").removeClass("selected");
$(this).addClass("selected"); $(this).addClass("selected");

View File

@ -477,17 +477,10 @@ var wide = {
this._initWS(); this._initWS();
// 点击隐藏弹出层 // 点击隐藏弹出层
$("body").bind("mousedown", function (event) { $("body").bind("mouseup", function (event) {
if (!(event.target.id === "dirRMenu" || $(event.target).closest("#dirRMenu").length > 0)) {
$("#dirRMenu").hide();
}
if (!(event.target.id === "fileRMenu" || $(event.target).closest("#fileRMenu").length > 0)) {
$("#fileRMenu").hide();
}
if (!($(event.target).closest(".frame").length > 0 || event.target.className === "frame")) {
$(".frame").hide(); $(".frame").hide();
if (!($(event.target).closest(".frame").length === 1 || event.target.className === "frame")) {
$(".menu > ul > li").unbind().removeClass("selected"); $(".menu > ul > li").unbind().removeClass("selected");
menu.subMenu(); menu.subMenu();
} }