弹出层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 () {
$(".bottom-window-group .output").parent().mousedown(function (event) {
$(".bottom-window-group .output").parent().mouseup(function (event) {
event.stopPropagation();
if (event.button === 0) { // 左键

View File

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

View File

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

View File

@ -55,7 +55,7 @@ var wide = {
$("#outline li").dblclick(function () {
var $it = $(this),
cursor = CodeMirror.Pos($it.data('line'), $it.data("ch"));
cursor = CodeMirror.Pos($it.data('line'), $it.data("ch"));
wide.curEditor.setCursor(cursor);
wide.curEditor.focus();
});
@ -477,17 +477,10 @@ var wide = {
this._initWS();
// 点击隐藏弹出层
$("body").bind("mousedown", function (event) {
if (!(event.target.id === "dirRMenu" || $(event.target).closest("#dirRMenu").length > 0)) {
$("#dirRMenu").hide();
}
$("body").bind("mouseup", function (event) {
$(".frame").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();
if (!($(event.target).closest(".frame").length === 1 || event.target.className === "frame")) {
$(".menu > ul > li").unbind().removeClass("selected");
menu.subMenu();
}