New issue
Advanced search Search tips

Issue 615343 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Compat



Sign in to add a comment

Selection#selectNodeCotents() should be range to cover BR isntead of caret

Reported by cyril.au...@gmail.com, May 27 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.10 Safari/537.36

Example URL:
https://jsfiddle.net/crl/d33x260L/2/

Steps to reproduce the problem:
1. https://jsfiddle.net/crl/d33x260L/2/
2. 
3. 

What is the expected behavior?
table should replace i

What went wrong?
table block inserted inside inline <i>

Does it occur on multiple sites: No

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 52.0.2743.10  Channel: dev
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0

Firefox replaces/removes <i> by the table
 
Components: Blink>Layout>Table
Labels: Needs-Feedback
Tested the issue on Windows 7, Mac 10.11.5, Ubuntu 14.04 using 52.0.2743.10, latest canary 53.0.2751.0 with below steps:

1.Opened URL: https://jsfiddle.net/crl/d33x260L/2/
2.Observed the behavior of chrome and firefox as in screencast.

Please find attached screencast and confirm whether the border(box) for 1,2 elements is appeared and disappeared when clicked in chrome is the issue?

cyril.auburtin@Could you please provide expected behavior screencast for further triaging the issue.
615343.mp4
661 KB Download
Visually the result is ok, but when inspecting the DOM (see attachment) <i> containing a <table> isn't valid
Capturecrhomeitable.JPG
33.7 KB View Download
Project Member

Comment 3 by sheriffbot@chromium.org, May 31 2016

Labels: -Needs-Feedback Needs-Review
Owner: ssamanoori@chromium.org
Thank you for providing more feedback. Adding requester "ssamanoori@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 4 by e...@chromium.org, Jun 1 2016

Components: -Blink>Layout>Table Blink>Editing

Comment 5 by yosin@chromium.org, Jun 9 2016

Components: -Blink>Editing Blink>TextSelection
Labels: -OS-Windows OS-All
Status: Available (was: Unconfirmed)
Summary: Selection#selectNodeCotents() should be range to cover BR isntead of caret (was: invalid <i><table> markup obtained in contenteditable [blink])
The sample program should be replace BR in I element by TABLE, since selection should covers contents of I element by Selection#selectNodeContents().

This is cause by visible canonicalization of selection.

getSeleciton.selectNodeContents(document.querySelector('i')) sets selection to <i class="fa fa-music">|<br>, instead of <i class="fa fa-music">^<br>|</i>.

Thanks Yosin, selectNodeContents was intentional, I thought insertHTML's responsibility was to maintain a valid structure, but you answered in another issue that no. It does some soft merges sometimes.

Thanks for your replies

Labels: -Needs-Review
Owner: ----

Comment 8 by tkent@chromium.org, Oct 12 2016

Components: -Blink>TextSelection Blink>Editing>Selection

Comment 9 by yosin@chromium.org, Oct 4 2017

Labels: Pri-3
Project Member

Comment 10 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
Status: Available (was: Untriaged)

Sign in to add a comment