Closed Bug 1697249 Opened 3 years ago Closed 3 years ago

Unable to write posts/comments containing mentions on linkedin.com

Categories

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

Firefox 88
Desktop
All
defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox86 --- wontfix
firefox87 --- wontfix
firefox88 --- fixed

People

(Reporter: ksenia, Assigned: masayuki)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(2 files)

This was initially reported in https://github.com/webcompat/web-bugs/issues/67604

Steps to reproduce:

  1. Log in to your LinkedIn account and proceed to https://www.linkedin.com/feed/ in Firefox Nightly 88.0a1 / Firefox release
  2. Under any post press "Comment" button to display contenteditable box
  3. Type "@" to trigger autocomplete with your friends list
  4. Select any friend from the list to "mention" them and press Space
  5. Type any message and observe the text

Actual:
Text is bold as it's a part of the mention

Expected:
Text is in normal font

This behavior results in an error when trying to post the comment. There is a video recorder by the initial reporter https://www.youtube.com/watch?v=cO-ojh7whKo

From mozregression:

27:02.96 INFO: Narrowed integration regression window from [687d3f79, c5fb8455] (3 builds) to [bd0fd84d, c5fb8455] (2 builds) (~1 steps left)
27:02.96 INFO: No more integration revisions, bisection finished.
27:02.96 INFO: Last good revision: bd0fd84dbf437b7f0cddacd51520176c6f4dec2e
27:02.96 INFO: First bad revision: c5fb8455ae1a6a29bb7d1d9c093f5ca48e294f5d
27:02.96 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=bd0fd84dbf437b7f0cddacd51520176c6f4dec2e&tochange=c5fb8455ae1a6a29bb7d1d9c093f5ca48e294f5d
Attached file 67604.html

I've created a reduced test case and I think the problem here is that there is an additional <span> element is added after the link (with the same classname as the link) and it's not what the site expects

Hi Masayuki, would you be able to take a look at this?

Flags: needinfo?(masayuki)
Summary: Unable to write posts/comments containing mentions → Unable to write posts/comments containing mentions on linkedin.com
OS: Unspecified → All
Hardware: Unspecified → Desktop

This breaks a major SNS, so, I should fix ASAP.

Assignee: nobody → masayuki
Severity: -- → S2
Status: NEW → ASSIGNED
Flags: needinfo?(masayuki)
Priority: -- → P1

When typing at edge of a link, editor splits the link element at the edge (i.e.,
creating an empty link element). Then, unlink the new link element (i.e.,
clearing the "link style"). At this time, class attribute and style
attribute are cloned to new <span> element for keeping the original style.
However, in this case, other browsers discard the specified style of the link.

On the other hand, when unlinking a link with execCommand("unlink"), the
other browsers keep specified style coming from style attribute.

Therefore, this patch adds new state to PropItem, which indicates whether
the class and style attribute should be cloned or discarded. And then,
when preparing for inserting text, this patch makes it pass to the utility
method.

For better compatibility, we should stop cloning class attribute, but not
in this bug because this patch should be minimized for requesting uplift to
beta channel.

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/fae7c1c56f0f
Stop creating `<span>` element for keeping same style as the link when the link will be unlinked r=m_kato
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28021 for changes under testing/web-platform/tests

Please request beta uplift ASAP if you think this is important and safe enough (it would likely land directly into the 87 release candidate).

Flags: needinfo?(masayuki)
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch

(In reply to Julien Cristau [:jcristau] from comment #7)

Please request beta uplift ASAP if you think this is important and safe enough (it would likely land directly into the 87 release candidate).

Hmm, then, I think that it's too risky to up lift. Thank you for your attention.

Flags: needinfo?(masayuki)
Upstream PR merged by moz-wptsync-bot
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: