Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE creates incorrect list structure when removing list item #2774

Open
engineering-this opened this issue Jan 22, 2019 · 0 comments
Open

IE creates incorrect list structure when removing list item #2774

engineering-this opened this issue Jan 22, 2019 · 0 comments
Labels
browser:ie The issue can only be reproduced in the Internet Explorer browser. plugin:list The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:feature A feature request.

Comments

@engineering-this
Copy link
Contributor

Type of report

Feature request (workaround)

Provide description of the new feature

Extracted from #2738 (review)

This is request for workaround for an IE upstream issue.

  1. Create simple html file with given content:
<div contenteditable="true">
	<ol>
		<li>Foo
			<ol>
				<li>Bar
					<ol>
						<li>Baz</li>
						<li>Faz</li>
					</ol>
				</li>
			</ol>
		</li>
	</ol>
</div>
  1. Open with Internet Explorer.
  2. Place caret like this: <li>Bar^.
  3. Tap Backspace three times.

What happens?

li element is removed, and its content is extracted to ol. Markup looks like this;

<div contenteditable="true">
	<ol>
		<li>Foo
			<ol>
				<ol>
					<li>Baz</li>
					<li>Faz</li>
				</ol>
			</ol>
		</li>
	</ol>
</div>

jan-22-2019 09-55-05

Note: when selection is in the middle of text, or is followed by inline elements behaviour is works as expected:

jan-22-2019 09-55-09

Why is it problematic?

We have dedicated logic to merge list items, which fires when Backspace is pressed with selection at the start of li element. But this logic doesn't trigger when IE removes this element with selection at index 1 of text, eg. <li>F^. Workaround should detect all cases when IE removes the element together with text and trigger list item merging logic.

@engineering-this engineering-this added type:feature A feature request. status:confirmed An issue confirmed by the development team. browser:ie The issue can only be reproduced in the Internet Explorer browser. plugin:list The plugin which probably causes the issue. labels Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser:ie The issue can only be reproduced in the Internet Explorer browser. plugin:list The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:feature A feature request.
Projects
None yet
Development

No branches or pull requests

1 participant