Fix context menu text being different based on where right click occurred for emojis

Co-authored-by: Scott Nonnenberg <scott@signal.org>
Co-authored-by: khuddite <biliie811028@hotmail.com>
This commit is contained in:
automated-signal 2024-11-06 17:00:01 -06:00 committed by GitHub
parent 471dc78aa9
commit d5d7436df8
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;