Closed Bug 1518401 Opened 2 years ago Closed 2 years ago

caret should not move into even more ligated Emoji sequences


(Core :: Layout: Text and Fonts, defect, P3)

64 Branch



Tracking Status
firefox66 --- fixed


(Reporter: thomas.a.levy, Assigned: jfkthame)




(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:64.0) Gecko/20100101 Firefox/64.0

Steps to reproduce:

go to the url "data:text/html;charset=utf-8,<h1 contenteditable>%F0%9F%92%82%E2%80%8D%E2%99%80%EF%B8%8F", place your cursor to the right of the emoji and press the left arrow key

Actual results:

Cursor is midway through the female guard emoji

Expected results:

Cursor goes to the left of the female guard emoji.

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core

I believe this is unfinished business from bug #1484094

Ah, I see... this will also apply to emoji that are constructed of [man/woman] + zwj + [occupation] + vs-16, such as the sequences for "man/woman health worker", "man/woman judge", etc.

The patch in bug 1484094 didn't consider the case where the trailing component of the ligature was not an emoji-default-presentation character, but a legacy BMP symbol (such as the gender symbols, or certain occupations like medical or judge) that is emoji-fied by the addition of VS16. So this patch adds a check for this type of sequence, and prevents the cursor being placed there.
Attachment #9034953 - Flags: review?(m_kato)
Assignee: nobody → jfkthame
Ever confirmed: true
Priority: -- → P3
Attachment #9034953 - Flags: review?(m_kato) → review+
Pushed by
Exclude caret position within ligated emoji sequence where the second component was a BMP symbol + VS16. r=m_kato
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
QA Whiteboard: [good first verify]

I have reproduced this bug with Nightly 66.0a1 (2019-01-07) on Windows 10, 64 Bit. This fix of this bug is verified with latest Beta 66.0b5!

Build ID : 20190204181317
User Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0

QA Whiteboard: [good first verify] → [good first verify] [bugday-20190206]
See Also: → 1527387
You need to log in before you can comment on or make changes to this bug.