diff --git a/src/platform/macos/view.rs b/src/platform/macos/view.rs index bc9f8043..a7f2be76 100644 --- a/src/platform/macos/view.rs +++ b/src/platform/macos/view.rs @@ -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