Fix MinimapView hitTest intercepting clicks when hidden#371
Open
sanvibyfish wants to merge 1 commit intoCodeEditApp:mainfrom
Open
Fix MinimapView hitTest intercepting clicks when hidden#371sanvibyfish wants to merge 1 commit intoCodeEditApp:mainfrom
sanvibyfish wants to merge 1 commit intoCodeEditApp:mainfrom
Conversation
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 CodeEditApp#370
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When
showMinimapis set tofalse,MinimapView.isHiddenis set totrue. However, thehitTest(_:)override does not checkisHidden, so the hidden minimap still intercepts all click events in its frame area (~140px on the right side of the editor). Combined with the emptymouseDownoverride, clicks are silently swallowed, preventing cursor placement on the right portion of the editor.The fix adds
guard !isHidden else { return nil }at the top ofhitTest.Related Issues
Checklist
Screenshots
N/A — this is a one-line behavioral fix. The minimap is visually hidden but its hit area was still active.