MinimapView hitTest ignores isHidden, intercepts clicks when minimap is hidden
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start at MinimapView.hitTest(_:) and its mouseDown(with:) override in the source editor. Reproduce with SourceEditorConfiguration set to showMinimap: false, then verify that clicks in the minimap's former frame reach the underlying text view and that normal minimap interaction remains unaffected.
Written by the indexing model from the issue text.
Description
Description
When showMinimap is set to false in SourceEditorConfiguration, the MinimapView is hidden via isHidden = true. However, clicks on the right ~140px of the editor are still intercepted by the hidden minimap, preventing cursor placement in that area.
Root Cause
MinimapView.hitTest(_:) overrides NSView.hitTest but does not check isHidden:
override public func hitTest(_ point: NSPoint) -> NSView? {
guard let point = superview?.convert(point, to: self) else { return nil }
// ...
}
Combined with the empty mouseDown override:
override public func mouseDown(with event: NSEvent) { }
This means the hidden minimap silently swallows all click events in its frame area.
Steps to Reproduce
- Create a
SourceEditorwithperipherals: .init(showMinimap: false) - Open any text file
- Try to click on the right portion of the editor (where the minimap would normally be)
- The cursor does not move — the click is eaten by the hidden minimap
Expected Behavior
When showMinimap: false, clicks should pass through to the underlying text view.
Suggested Fix
Add an isHidden guard at the top of hitTest:
override public func hitTest(_ point: NSPoint) -> NSView? {
guard !isHidden else { return nil }
guard let point = superview?.convert(point, to: self) else { return nil }
// ...
}
Environment
- CodeEditSourceEditor v0.15.2
- macOS 15.5, Apple Silicon
- Dominant language
- Swift
- Stars
- 720
- Forks
- 162
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CodeEditApp/CodeEditSourceEditor
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
CodeEditApp/CodeEditSourceEditor#377 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
CodeEditApp/CodeEditSourceEditor#376 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
CodeEditApp/CodeEditSourceEditor#378 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in CodeEditApp/CodeEditSourceEditor
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
type: docs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
googleapis/google-cloud-swift#971 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mozilla-mobile/firefox-ios#35743 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
manaflow-ai/cmux#13417 ·