Skip to content

Commit 1f164cb

Browse files
committed
Prevent text attachment view from proxying interactions to content view
STTextView would incorrectly handle interactions with text attachment views, proxying them to the content view instead. This change fixes that by detecting when the view is a descendant of a text layout fragment view and avoiding the proxy in that case.
1 parent 2826711 commit 1f164cb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/STTextViewAppKit/STTextView.swift

+4
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,10 @@ import AVFoundation
756756
if let view = result, view != self,
757757
(view.isDescendant(of: contentView) || view.isDescendant(of: selectionView))
758758
{
759+
// FIXME: NSTextAttachment view
760+
// attachment view is a child of STTextLayoutFragmentView
761+
// that itself is child of contentView.
762+
// The text attachment view should not proxy interaction to the contentView
759763
return self
760764
}
761765
return result

0 commit comments

Comments
 (0)