Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/platform/macos/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,14 @@ impl ViewImpl for BaseviewView {
/// collapse, so the override pass-through is equivalent to the
/// default implementation.
fn hit_test(this: ViewRef<'_, Self>, point: NSPoint) -> Option<&NSView> {
// Use the statically-known NSView class instead of a live `this.view.class()` lookup.
// baseview itself registers this class's superclass as NSView::class() at creation time
// (see src/wrappers/appkit/view/implementation.rs), so this isn't a new assumption — it's
// the same value, fetched safely instead of re-derived at hitTest call time, where the
// live lookup was returning something else on macOS 26.6 and causing infinite recursion.
// prior:
// let superclass = this.view.class().superclass().unwrap();

let superclass = NSView::class();

// SAFETY: Our superclass is NSView
Expand Down