mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Remove "Paste & match style" on plain text inputs
This commit is contained in:
@@ -201,7 +201,15 @@ export const setup = (
|
|||||||
template.push({ label: i18n('icu:editMenuPaste'), role: 'paste' });
|
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({
|
template.push({
|
||||||
label: i18n('icu:editMenuPasteAndMatchStyle'),
|
label: i18n('icu:editMenuPasteAndMatchStyle'),
|
||||||
role: 'pasteAndMatchStyle',
|
role: 'pasteAndMatchStyle',
|
||||||
|
|||||||
Reference in New Issue
Block a user