#3838 closed defect (bug) (fixed)
Editing Descriptions that contain emoji's strip the emoji
Reported by: | garrett-eclipse | Owned by: | dd32 |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Trac | Keywords: | |
Cc: |
Description (last modified by )
Hello,
As @SergeyBiryukov found here - https://core.trac.wordpress.org/ticket/44987#comment:3
The emoji's within Trac Ticket descriptions get stripped from the description edit field.
Example - https://core.trac.wordpress.org/ticket/43354
To reproduce without muddying the ticket simply put your cursor in the description field and wait for the JS to reload the ticket contents and you'll find the emoji stripped. Or if you just look in the description field you'll find no characters within it representing the emoji.
Cheers
✅👍🎉
Attachments (2)
Change History (10)
#2
@
5 years ago
Turns out that this isn't even a Trac bug, it's a combination Twemoji or WordPress Emoji issue.
The tl;dr of it is, the WordPress Emoji MutationObserver calls twemoji.parse()
with a textarea
node, which causes twemoji.grabAllTextNodes()
to fetch all the subnodes of a textarea
node, and not skip textarea
as it "should".
I'm debating on if it's a twemoji or WordPress Emoji bug (leaning towards the latter) as I think twemoji is doing exactly what is wanted, processing Emoji's within an element that's usually skipped but doing so because it's been told to process that exact node.
On the other hand, maybe it's unexpected that passing a skipped node to twemoji.parse()
should process it..
#3
@
5 years ago
- Owner set to dd32
- Status changed from new to accepted
After chatting with Gary, I decided to just add the wp-exclude-emoji
class to the textareas in Trac, I have a WIP patch for that.. but it needs some more testing
Ticket w/ Emoji