Skip to content

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

Open
prometheusalpha wants to merge 1 commit intomountain-loop:mainfrom
prometheusalpha:main
Open

fix: bug where selection layer leaves a ghost residual line below wrapped lines after deselecting#432
prometheusalpha wants to merge 1 commit intomountain-loop:mainfrom
prometheusalpha:main

Conversation

@prometheusalpha
Copy link
Copy Markdown

@prometheusalpha prometheusalpha commented Mar 19, 2026

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.

Related

Before:

Screen.Recording.2026-03-19.at.10.15.42.mov

After:

Screen.Recording.2026-03-19.at.10.17.05.mov

CodeMirror issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant