Selection#selectNodeCotents() should be range to cover BR isntead of caret
Reported by
cyril.au...@gmail.com,
May 27 2016
|
|||||||||
Issue descriptionUserAgent: 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
,
May 31 2016
Visually the result is ok, but when inspecting the DOM (see attachment) <i> containing a <table> isn't valid
,
May 31 2016
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
,
Jun 1 2016
,
Jun 9 2016
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>.
,
Jun 9 2016
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
,
Jun 15 2016
,
Oct 12 2016
,
Oct 4 2017
,
Oct 4
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
,
Oct 5
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by ssamanoori@chromium.org
, May 31 2016Labels: Needs-Feedback
661 KB
661 KB Download