New issue
Advanced search Search tips

Issue 610344 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

content after the selection is tranformed with insertHTML [contenteditable, blink]

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

Issue description

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

Steps to reproduce the problem:
1. https://jsfiddle.net/472jdns0/2/
2. https://jsfiddle.net/472jdns0/3/
3. 

What is the expected behavior?
1. :<table>...</table>quxfoo bar 
2. :<table>...</table>qux<p>foo bar</p> 

What went wrong?
<table>...</table><h1>quxfoo bar<br></h1> 

on chrome52, in both cases

Did this work before? N/A 

Chrome version: 52.0.2723.2  Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0
 

Comment 1 Deleted

https://jsfiddle.net/472jdns0/4/ another example, blockquote should be removed and replaced by its content, but the output still have a blockquote shifted to the next sibling

This is an important issue, probably specific to insertHTML. Using formatblock for the moment, that behaves better

	formatBlock(value){ // improved formatBlock, toggle/unwrap content
		let currentValue = document.queryCommandValue('formatblock');
		if (value!==currentValue) return exec('formatblock', value);
		let block=sel.getRange().closest(currentValue||'*');
		while (block.contentEditable!=='true'&&block.parentNode.contentEditable!=='true'&&block.parentNode.childElementCount===1)
			block = block.parentNode;
		sel.setRange(sel.selectNode(block));
		exec('formatblock', 'div');
		
	}

Comment 3 by ajha@chromium.org, May 11 2016

Cc: ajha@chromium.org
Components: Blink>Editing
Labels: M-52 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Issue is reproducible on the latest canary(52.0.2730.0) and the latest stable(50.0.2661.94) on Windows-7, Mac OS 10.11.4 and Linux Ubuntu 14.04.

On older chrome version(30.0.1549.0) the above jsfiddles show followig result:

1. https://jsfiddle.net/472jdns0/3/

Output:
========= 
ioh	 2 2
i ,, h	 4 4 .
ok

foo bar 

2. https://jsfiddle.net/472jdns0/4/

Output:
========
      foo bar
thing


Marking this Untriaged and as non-regression issue for further investigation.

Thank you! 

Comment 4 by yosin@chromium.org, May 17 2016

Components: -Blink>Editing Blink>Editing>Command
Status: Available (was: Untriaged)
Project Member

Comment 5 by sheriffbot@chromium.org, Jun 1 2016

Labels: -M-52 M-53 MovedFrom-52
Moving this nonessential bug to the next milestone.

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

Comment 6 by sheriffbot@chromium.org, Jul 10 2016

Labels: -M-53 MovedFrom-53
This issue has been moved once and is lower than Pri-1. Removing the milestone.

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

Comment 7 by sheriffbot@chromium.org, Aug 8 2017

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. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

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

Comment 8 by yosin@chromium.org, Aug 21 2017

Status: Available (was: Untriaged)

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

Labels: Pri-3
Project Member

Comment 10 by sheriffbot@chromium.org, Oct 4

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