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

Not escaping the list item when at the start of code block #11538

Closed
CatStrategist opened this issue Mar 31, 2022 · 3 comments · Fixed by #11564
Closed

Not escaping the list item when at the start of code block #11538

CatStrategist opened this issue Mar 31, 2022 · 3 comments · Fixed by #11564
Assignees
Labels
package:list squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@CatStrategist
Copy link
Contributor

Steps:

  1. Create a list item
  2. In this list item add codeblock
  3. Type foo
  4. Put the cursor at the beginning of the text - []foo
  5. Press backspace

Expected:

List item is removed.

Actual:

Nothing happens, backspace for removing list item works only if you first remove the whole text.

Screencast:

0_list1.mp4

Originally posted by @FilipTokarski in #11377 (comment)

@CatStrategist
Copy link
Contributor Author

@FilipTokarski What's the browser/OS? I use chrome@macOS and it works fine

Nagranie.z.ekranu.2022-03-31.o.16.59.44.mov

.

@CatStrategist CatStrategist changed the title Not escape the list item when at the start of code block Not escaping the list item when at the start of code block Mar 31, 2022
@FilipTokarski FilipTokarski added type:bug This issue reports a buggy (incorrect) behavior. package:list squad:core Issue to be handled by the Core team. labels Apr 1, 2022
@FilipTokarski
Copy link
Member

FilipTokarski commented Apr 1, 2022

This behaviour is caused by the Text part language plugin. If you remove it from the build, everything works fine.

@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Apr 4, 2022
@arkflpc arkflpc self-assigned this Apr 4, 2022
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Apr 4, 2022
@arkflpc
Copy link
Contributor

arkflpc commented Apr 5, 2022

Root cause: CodeBlockEditing added codeBlock element to model with language attribute. TextPartLanguageEditing was triggered by this attribute and added span around codeBlock which wasn't expected by DocumentListEditing's downcast. So the list was outdented correctly in the model, but view retained <ul><li>...</li></ul>.

Possible solution: Downcast in TextPartLanguageEditing should ignore language attributes when the item is neither $textProxy nor documentSelection

niegowski added a commit that referenced this issue Apr 6, 2022
…ck-interference-fix

Fix (language): Fixes interference between `TextPartLanguage` and `CodeBlock`. Closes #11538. Closes #11563.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Apr 6, 2022
@CKEditorBot CKEditorBot added this to the iteration 53 milestone Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:list squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants