Remove "Paste & match style" on plain text inputs

Co-authored-by: Jamie <113370520+jamiebuilds-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2025-11-20 12:37:17 -06:00
committed by GitHub
parent d5e5b937e6
commit db6661614e

View File

@@ -201,7 +201,15 @@ export const setup = (
template.push({ label: i18n('icu:editMenuPaste'), role: 'paste' });
}
if (editFlags.canPaste && !isImage) {
// It seems like `canEditRichly` is unreliable for `contenteditable`
// But `formControlType` will tell us if the element is some native
// input/button/etc, and any `contenteditable` should be "none"
const isLikelyRichTextEditor = params.formControlType === 'none';
if (
editFlags.canPaste &&
(editFlags.canEditRichly || isLikelyRichTextEditor) &&
!isImage
) {
template.push({
label: i18n('icu:editMenuPasteAndMatchStyle'),
role: 'pasteAndMatchStyle',