On Android, selectable={true} on EnrichedMarkdownText makes regular text selectable (native text-selection menu on longpress), but CodeBlockContainerView.kt and TableContainerView.kt hardcode setOnLongClickListener { ... showContextMenu(...) }, which opens the library's custom popup (copy code / copy as markdown, or copy table) instead of the native menu. Code blocks also already expose a copy button in the header (copyButton), so for those the longpress popup is redundant with the builtl in copy affordance.
There's no way to disable the popup or fall back to the native selection menu. The selectable prop only affects regular text segments.
Would be useful to turn this off per instance.. e.g. a prop on EnrichedMarkdownText or a flag in the style object.
Working around it locally with patch-package (stripping the listeners) for now. Happy to open a PR if a prop is the right direction.
Additional notes:
- Math blocks follow the same pattern —
isMathContainerView also receives setCopyLabel/copyAsMarkdownLabel and shows the same popup, so a fix should cover tables, code blocks, and math.
selectionMenuConfig labels already apply to the table and math block copy menus, so extending enabled: false on its items to hide the whole block popup might be the least new API path.
On Android,
selectable={true}onEnrichedMarkdownTextmakes regular text selectable (native text-selection menu on longpress), butCodeBlockContainerView.ktandTableContainerView.kthardcodesetOnLongClickListener { ... showContextMenu(...) }, which opens the library's custom popup (copy code / copy as markdown, or copy table) instead of the native menu. Code blocks also already expose a copy button in the header (copyButton), so for those the longpress popup is redundant with the builtl in copy affordance.There's no way to disable the popup or fall back to the native selection menu. The
selectableprop only affects regular text segments.Would be useful to turn this off per instance.. e.g. a prop on
EnrichedMarkdownTextor a flag in the style object.Working around it locally with patch-package (stripping the listeners) for now. Happy to open a PR if a prop is the right direction.
Additional notes:
isMathContainerViewalso receivessetCopyLabel/copyAsMarkdownLabeland shows the same popup, so a fix should cover tables, code blocks, and math.selectionMenuConfiglabels already apply to the table and math block copy menus, so extendingenabled: falseon its items to hide the whole block popup might be the least new API path.