New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 671992 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Incomplete MutationObserver records produced when merging an editable text node

Reported by mari...@gmail.com, Dec 7 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36

Steps to reproduce the problem:
1. Create an editable paragraph like <p>foo<br>bar</p>
2. Register a MutationObserver on the editable node
3. With the cursor in front of the <br> node, press ctrl/cmd-delete

What is the expected behavior?
When the browser merges the text nodes before and after the <br>, a childNodes mutation record is produced telling me that the second text node ("bar") was removed.

What went wrong?
Only two records are produced, a childNodes record that tells me the <br> was removed, and a characerData record that tells me the text value of the first text node ("foo", now "foobar") was changed.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 54.0.2840.100  Channel: stable
OS Version: 
Flash Version: Shockwave Flash 23.0 r0
 
Labels: M-57
Cc: kavvaru@chromium.org
Labels: Needs-Feedback
marijnh@Thanks for the issue.

Could you please provide any test file or URL to triage the issue form test team end.

Thanks,

Comment 3 by mari...@gmail.com, Dec 13 2016

You can see it happen at http://marijnhaverbeke.nl/upload/test-mutations.html , though with current Chrome, ctrl-delete seems to delete the word after the BR node immediately, so you have to press plain delete to see the effect.
Project Member

Comment 4 by sheriffbot@chromium.org, Dec 20 2016

Labels: -Needs-Feedback Needs-Review
Owner: kavvaru@chromium.org
Thank you for providing more feedback. Adding requester "kavvaru@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by hdodda@chromium.org, Dec 21 2016

Cc: hdodda@chromium.org
Labels: -Needs-Review Needs-Feedback
Owner: ----
Tested on ubuntu 14.04 using latest stable 55.0.2883.87 and didn't observe difference in chrome and firefox results.

Attached screenshot for reference.

@marijnh-- Could you please check the attached screenshot and confirm us whether we have followed the steps correct. If possible provide us the screenshot of the expected result.

Thanks!
671992.png
384 KB View Download

Comment 6 by mari...@gmail.com, Dec 21 2016

Firefox has the same issue. The problem with this behavior is that a change from the child list [textnode("foo"), BR, textnode("bar")] to [textnode("foobar")] is represented as a single childList record which removes the second child. But if you 'replay' that change, you'd end up [textnode("foo"), textnode("bar")], which is not the DOM structure that the document has. There's apparently some automatic joining of text nodes going on which is failing to fire the appropriate mutation records.
Project Member

Comment 7 by sheriffbot@chromium.org, Dec 28 2016

Labels: -Needs-Feedback Needs-Review
Owner: hdodda@chromium.org
Thank you for providing more feedback. Adding requester "hdodda@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 8 by hdodda@chromium.org, Jan 12 2017

Labels: -Needs-Review Needs-Feedback
Owner: ----
@marijnh-- Could you please provide us the screencast to reproduce the issue , that would help us in investigating the issue further.

Thanks!

Comment 9 by yosin@chromium.org, Feb 11 2017

Status: Available (was: Unconfirmed)
Text::mergeNextSiblingNodesIfPossible() uses setDataWitoutUpdate() then calls CharacterData::didModifyData() which put mutation record.
Labels: Pri-3
Project Member

Comment 11 by sheriffbot@chromium.org, Oct 4

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Yes, this is still broken.
Status: Available (was: Untriaged)

Sign in to add a comment