Closed Bug 1584901 Opened 1 year ago Closed 1 year ago

When editing span included editing attributes (contenteditable = "true") of HTML, The space of the Hangul text is written incorrect in “div - span” structure of HTML.

Categories

(Core :: DOM: Editor, defect, P2)

x86_64
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox-esr68 --- wontfix
firefox71 --- fixed

People

(Reporter: wkim, Assigned: m_kato)

References

Details

(Keywords: inputmethod, Whiteboard: [specification][type:bug])

Attachments

(2 files, 1 obsolete file)

What did you do?

Hi,
I found an issue with the firefox browser.
When span tag has editing attributes (contenteditable = "true") in “div - span” structure of HTML,
You input Hangul consonants and vowels, and You input space, Hangul consonants and vowels immediately.
Then, the space of the text is written incorrect.
Please check the issue.

Thank you.

browser version:
firefox 69.0.1 (64 bits)

What happened?

Example :
I input “가가가 나나나”

Result of firefox browser:
“가가가ㄴ나나나”

expected result that I hope for:
“가가가 나나나”

What should have happened?

.

Is there anything else we should know?

Attach the test sample code.

<html><head>

<style>
</style>

</head>

<body>

<div style="overflow: hidden;
height: 100%;
width: 100%;
display: flex;">

<div style="border-color: rgb(32, 58, 123); width:100px; height:100px; background-color: yellow;"><span style="width:100px; height:100px; display:block" display:="" contenteditable="true"></span></div>
</div>

</body></html>

Attached patch sampleCode.html (obsolete) — Splinter Review

sample code

Attachment #9097268 - Attachment description: Edit.html → sampleCode.html
Attachment #9097268 - Attachment filename: Edit.html → sampleCode.html
Attachment #9097268 - Attachment is obsolete: true
Attachment #9097268 - Attachment is patch: true
Attachment #9097268 - Attachment mime type: text/html → text/plain
Attached file sampleCode.html

sample code

Dropping sec flag since this doesn't look like a security issue.

Group: websites-security
Component: Editing → Untriaged
Product: developer.mozilla.org → Firefox

What OS and IME do you use? And could you reproduce when using Firefox Nightly (from https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly) since I cannot reproduce on Microsoft Korean IME + Windows 10 + Firefox Nightly?

Flags: needinfo?(wkim)
Component: Untriaged → Editor
Product: Firefox → Core
Duplicate of this bug: 1584903

I use default korean of Mac OS in South Korea.
I found other problem when using Firefox Nightly.
I input Hangul consonants and vowels, and You input space, Hangul consonants and vowels immediately.
Then, the space of the text is disappeared.
I used sampleCode atteched.

Example :
I input “가가가 나나나”

Result of firefox Nightly browser:
“가가가나나나”

and I have a question. Do you no longer reproduce on Firefox browser + all OS ? Do you only reproduce on Firefox Nightly browser?
Do you no longer reproduce on Microsoft Korean IME + Windows 10 + Firefox browser ?

I need solution of the issue on Firefox browser.

Thank you

Flags: needinfo?(wkim)

My iMac desktop version.

macOS High Sierra.
iMac (Retina 5K, 27-inch, 2017)
version 10.13.6

(In reply to wkim from comment #6)

I use default korean of Mac OS in South Korea.
I found other problem when using Firefox Nightly.
I input Hangul consonants and vowels, and You input space, Hangul consonants and vowels immediately.
Then, the space of the text is disappeared.

Thanks for information.

and I have a question. Do you no longer reproduce on Firefox browser + all OS ? Do you only reproduce on Firefox Nightly browser?

This depends on OS. I guess that this occurs on macOS + default Korean IME only.

Maybe, it is related to bug 1571375 since this sample has no <br> element too. If content has <br> element into <span contenteditable>, this won't occur.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: inputmethod
OS: Other → macOS
Priority: -- → P2
Hardware: All → x86_64

Related to bug 1530649. macOS's Korean IME has space with commit composition. I guess that we should replace last space with &nbsp;.

See Also: → 1530649
Assignee: nobody → m_kato

This is related to bug 1530649. When using <span> element with contentedtiable,
we won't insert <br> element at last. When Korean IME on macOS commits
composition by space key, composition string has space.

Gekco removes U+0020 space when it is last character into editing host. To keep
whitespace, we have to replace with NBSP when it is last.

I only use FF. I won't use FF Nightly.
and My issue occurs on Win10 + FF69.0.2(64bit) + Korean of basic app language.

when I used atteched my sample code, Result of firefox browser :
“가가가ㄴ나나나”

Can you resolve this issue ?

(In reply to wkim from comment #11)

I only use FF. I won't use FF Nightly.
and My issue occurs on Win10 + FF69.0.2(64bit) + Korean of basic app language.

when I used atteched my sample code, Result of firefox browser :
“가가가ㄴ나나나”

Can you resolve this issue ?

This issue will be fixed in 71 (release date is 3rd Dec) since it may be too late for 70. But Firefox 70 has bug 1571375's fix, it will be comment #6's result if you use 70.

Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/669c9f530d92
Convert tail space to NBSP in composition string. r=masayuki
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Flags: qe-verify+

Did you set ESR68 to affected because you wanted to nominate it for uplift?

Flags: needinfo?(m_kato)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #15)

Did you set ESR68 to affected because you wanted to nominate it for uplift?

I need update mochitest since landed mochitest doesn't work on ESR tree.

Hi, any updates here? :)

Flags: needinfo?(m_kato)
You need to log in before you can comment on or make changes to this bug.