From 929f6202a446ab0f43e1944f6789dde68d7658d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Huy=20Ho=C3=A0ng?= Date: Thu, 23 Apr 2026 20:30:18 +0700 Subject: [PATCH] fix: bug where selection layer leaves a ghost residual line below wrapped lines after deselecting (#432) Co-authored-by: hoangnh290 --- src-web/components/core/Editor/Editor.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src-web/components/core/Editor/Editor.css b/src-web/components/core/Editor/Editor.css index 6b80aa03..5143aca6 100644 --- a/src-web/components/core/Editor/Editor.css +++ b/src-web/components/core/Editor/Editor.css @@ -67,6 +67,13 @@ @apply bg-selection !important; } + /* Fix WebKit/WKWebView rendering bug where selection layer leaves a ghost + residual line below wrapped lines after deselecting (CodeMirror issue #1600, #1627). + The layer div must be hidden when empty to force a repaint. */ + .cm-selectionLayer:empty { + display: none; + } + /* Style gutters */ .cm-gutters {