Fix context menu text being different based on where right click occurred for emojis (#9215)

Co-authored-by: khuddite <biliie811028@hotmail.com>
This commit is contained in:
Scott Nonnenberg 2024-11-07 08:24:05 +10:00 committed by GitHub
parent 6014b5abfe
commit 2a9751035e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,7 +97,11 @@ export const setup = (
const isMisspelled = Boolean(params.misspelledWord);
const isLink = Boolean(params.linkURL);
const isImage =
params.mediaType === 'image' && params.hasImageContents && params.srcURL;
params.mediaType === 'image' &&
params.hasImageContents &&
params.srcURL &&
!editFlags.canCopy; // emoji should not be treated as an image
const showMenu =
params.isEditable || editFlags.canCopy || isLink || isImage;