Skip to content

Commit d3bf4fd

Browse files
committed
Fix MinimapView hitTest intercepting clicks when hidden
When showMinimap is false, MinimapView.isHidden is set to true but the hitTest override did not check isHidden. Combined with empty mouseDown/mouseDragged overrides, this caused the hidden minimap to silently swallow all click events in its frame area (~140px on the right side of the editor), preventing cursor placement. Add an isHidden guard at the top of hitTest so hidden minimap views return nil and let clicks pass through to the underlying text view. Closes #370
1 parent 1fa4d3c commit d3bf4fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/CodeEditSourceEditor/Minimap/MinimapView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ public class MinimapView: FlippedNSView {
267267
}
268268

269269
override public func hitTest(_ point: NSPoint) -> NSView? {
270+
guard !isHidden else { return nil }
270271
guard let point = superview?.convert(point, to: self) else { return nil }
271272
// For performance, don't hitTest the layout fragment views, but make sure the `documentVisibleView` is
272273
// hittable.

0 commit comments

Comments
 (0)