From 649fe71752571d2747f17817c35634b2918c811b Mon Sep 17 00:00:00 2001 From: FungLeo Date: Fri, 8 May 2020 13:38:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=EF=BC=8C=E4=BD=86=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E5=9C=A8=E9=A1=B5=E9=9D=A2=E9=BB=98=E8=AE=A4=E9=9A=90?= =?UTF-8?q?=E8=97=8F(display:=20none)=EF=BC=8C=E6=98=BE=E7=A4=BA=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E5=90=8E(=E4=BF=AE=E6=94=B9=E4=B8=BA=20displ?= =?UTF-8?q?ay:block)=EF=BC=8C=E5=BD=95=E5=85=A5=E6=96=87=E5=AD=97=E4=B8=8E?= =?UTF-8?q?=E5=BA=8F=E5=8F=B7=E9=87=8D=E5=8F=A0=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/codemirror/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/assets/js/codemirror/index.js b/src/assets/js/codemirror/index.js index 0d5ec3c..4a0f091 100644 --- a/src/assets/js/codemirror/index.js +++ b/src/assets/js/codemirror/index.js @@ -5347,6 +5347,8 @@ function patchDisplay(cm, updateNumbersFrom, dims) { function updateGutterSpace(display) { var width = display.gutters.offsetWidth; + // 修复初始化编辑器,但编辑器在页面默认隐藏(display: none),显示编辑器后(修改为 display:block),录入文字与序号重叠的BUG + width = Math.max(33, width) display.sizer.style.marginLeft = width + "px"; }