From 965aaf67b867921133057a5aade48d83de07e895 Mon Sep 17 00:00:00 2001 From: flowerField Date: Wed, 13 Jan 2021 14:26:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9C=A8=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E7=BC=96=E8=BE=91=E7=8A=B6=E6=80=81=E4=B8=8B=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E4=BA=86=E6=96=87=E6=9C=AC=E7=9A=84=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E5=AD=98=E5=9C=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/menuButton.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/controllers/menuButton.js b/src/controllers/menuButton.js index 1436fbf..393fad7 100644 --- a/src/controllers/menuButton.js +++ b/src/controllers/menuButton.js @@ -544,6 +544,8 @@ const menuButton = { _this.updateFormat(d, "fc", color); }); + + $("#luckysheet-icon-text-color-menu").mousedown(function(e){ hideMenuByCancel(e); e.stopPropagation(); @@ -598,7 +600,6 @@ const menuButton = { ["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"], ["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]], change: function (color) { - let $input = $(this); if (color != null) { color = color.toHexString(); } @@ -606,7 +607,6 @@ const menuButton = { color = "#000"; } - let oldcolor = null; // $("#luckysheet-icon-text-color .luckysheet-color-menu-button-indicator").css("border-bottom-color", color); // 下边框换成了一个DIV $("#luckysheet-icon-text-color .text-color-bar").css("background-color", color); @@ -617,6 +617,9 @@ const menuButton = { $menuButton.hide(); luckysheetContainerFocus(); + + /* 备注:在单元格编辑状态下切换了文本的颜色存在bug,此处需设置编辑框的color样式, */ + $("#luckysheet-input-box").css("color",color); }, }); @@ -738,7 +741,6 @@ const menuButton = { ["#600", "#783f04", "#7f6000", "#274e13", "#0c343d", "#073763", "#20124d", "#4c1130"] ], change: function (color) { - let $input = $(this); if (color != null) { color = color.toHexString(); } @@ -746,7 +748,6 @@ const menuButton = { color = "#fff"; } - let oldcolor = null; // $("#luckysheet-icon-cell-color .luckysheet-color-menu-button-indicator").css("border-bottom-color", color); // 下边框换成了一个DIV $("#luckysheet-icon-cell-color .text-color-bar").css("background-color", color);