[PR #432] fix: bug where selection layer leaves a ghost residual line below wrapped lines after deselecting #354

Open
opened 2026-03-22 21:19:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/432
Author: @prometheusalpha
Created: 3/19/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (1)

  • cf9fb64 fix: bug where selection layer leaves a ghost residual line below

📊 Changes

1 file changed (+7 additions, -0 deletions)

View changed files

📝 src-web/components/core/Editor/Editor.css (+7 -0)

📄 Description

Summary

Fix a visual glitch in the JSON body editor where a ghost/residual line appears below wrapped lines after double-clicking to select and then deselecting. This is a known WebKit rendering bug (CodeMirror issues #1600, #1627) where the selection layer div doesn't repaint after its children are removed. The fix adds a CSS rule to hide the empty selection layer, forcing WebKit to clear the ghost.

Environment

  • Mac Mini M4
  • MacOS Sequoia 15.6

Submission

  • This PR is a bug fix or small-scope improvement.
  • If this PR is not a bug fix or small-scope improvement, I linked an approved feedback item below.
  • I have read and followed CONTRIBUTING.md.
  • I tested this change locally.
  • I added or updated tests when reasonable.

Before:

https://github.com/user-attachments/assets/f3cbfb32-26e9-4ef0-a1fc-4f12a33d87c2

After:

https://github.com/user-attachments/assets/5eb57d8e-b901-4385-9e26-95a152e65174

CodeMirror issues:


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/432 **Author:** [@prometheusalpha](https://github.com/prometheusalpha) **Created:** 3/19/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`cf9fb64`](https://github.com/mountain-loop/yaak/commit/cf9fb64c7231f065e1f9091cebb963134e28f029) fix: bug where selection layer leaves a ghost residual line below ### 📊 Changes **1 file changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src-web/components/core/Editor/Editor.css` (+7 -0) </details> ### 📄 Description ## Summary Fix a visual glitch in the JSON body editor where a ghost/residual line appears below wrapped lines after double-clicking to select and then deselecting. This is a known WebKit rendering bug (CodeMirror issues [#1600](https://github.com/codemirror/dev/issues/1600), [#1627](https://github.com/codemirror/dev/issues/1627)) where the selection layer div doesn't repaint after its children are removed. The fix adds a CSS rule to hide the empty selection layer, forcing WebKit to clear the ghost. #### Environment - Mac Mini M4 - MacOS Sequoia 15.6 ## Submission - [X] This PR is a bug fix or small-scope improvement. - [ ] If this PR is not a bug fix or small-scope improvement, I linked an approved feedback item below. - [X] I have read and followed [CONTRIBUTING.md](CONTRIBUTING.md). - [X] I tested this change locally. - [ ] I added or updated tests when reasonable. ## Related Before: https://github.com/user-attachments/assets/f3cbfb32-26e9-4ef0-a1fc-4f12a33d87c2 After: https://github.com/user-attachments/assets/5eb57d8e-b901-4385-9e26-95a152e65174 CodeMirror issues: - CodeMirror issue [#1600 - Selection Background Stuck on iOS](https://github.com/codemirror/dev/issues/1600) - CodeMirror issue [#1627 - Selection glitch in Safari 26](https://github.com/codemirror/dev/issues/1627) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-22 21:19:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#354