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

Immutable content is removed when a line is deleted in the Editor #7070

Closed
martintabakov opened this issue Sep 30, 2022 · 6 comments
Closed
Assignees
Labels
Bug C: Editor FP: Completed Sync status with associated Feedback Item jQuery SEV: Medium
Milestone

Comments

@martintabakov
Copy link
Contributor

martintabakov commented Sep 30, 2022

Bug report

Immutable content is incorrectly removed when you delete line in the Editor textarea.

Reproduction of the problem

  1. Open this demo - https://demos.telerik.com/kendo-ui/editor/immutable-elements
  2. Place your mouse cursor after Dear Your Name,
  3. Hit Enter
  4. Hit Backspace

Current behavior

The immutable "Dear" part of the text is removed instead of the empty line

Expected/desired behavior

The immutable content should not be removed

Environment

  • Kendo UI version: 2023.3.1114
  • Browser: [all]
@github-actions github-actions bot added the FP: Unplanned Sync status with associated Feedback Item label Sep 30, 2022
@eyupyusein
Copy link
Contributor

Reported in ticket: 1603196

@GraemeSMiller
Copy link

Is there any update on when this might get scheduled? It seems critical functionality for immutable items. Also, your documentation online makes no mention that immutable doesn't work for this scenario which seems very misleading to other developers that aren't aware of this issue.

Demo literally says, "The immutable elements feature of the Kendo UI Editor component enables you to predefine elements in the content area that cannot be edited by the end user." I would say being removable qualifies as being editable.

@gdenchevprog gdenchevprog self-assigned this Dec 15, 2023
@github-actions github-actions bot added FP: Completed Sync status with associated Feedback Item and removed FP: Unplanned Sync status with associated Feedback Item labels Dec 21, 2023
@sspasova
Copy link

I am closing this issue because the described scenario is working after the applied fix.

Note that immutable elements cannot be edited as in having their formatting or text changed, however, they can be deleted.

Immutable elements can be removed in the following cases:
Case 1: Immutable element is (partially or fully) selected and the user is deleting(using backspace or delete key).
Case 2: Immutable element is (partially or fully) selected and the user is typing.
Case 3: Selection starts before the immutable and ends after it and the user is deleting by delete key

We will update our documentation accordingly so there are no more misunderstandings.
If you would like to request a different behavior for the immutable elements you can always log a feature request in our feedback portal - https://feedback.telerik.com/kendo-jquery-ui

@GraemeSMiller
Copy link

That is a really poor implementation of "immutable". The end user has no idea that they shouldn't be removing parts that are immutable. I've attempted to use this component with multiple differenet scenarios and end users are instantly confused. It is far to easy to highlight immutable elements so it just makes the whole piece pretty pointless (without a bunch of hacks to try to maintain the state). It is so easy to just accidently remove something

@trailmax
Copy link

@sspasova but I can totally edit those elements! they are clearly mutable if I can delete bits of these. What a misleading and useless component!

@gdenchevprog
Copy link
Contributor

Hey, @GraemeSMiller and @trailmax

I'm jumping in to provide a bit more clarification about the details shared by my colleague.
The comment itself was a response to the following statement which is not "fully" related to this issue in particular. The current intended behavior of an immutable is that such element can be removed.

The original problem that was reported, was that an immutable is incorrectly being removed when a new line is deleted. This in itself is indeed incorrect and it is what the patch aims to fix.

The immutable was first implemented around 7-8 years ago and client requirements at the time were that these should be elements that cannot be changed in terms of appearance or content, however they can be removed.

One of the initial purposes is similar to what is shown in the immutable elements demo. The immutables are sort of like an "email template" and the end user can modify the rest of the content, such as their name without being able to touch the template.

With the above said, I'd like to clarify that the statement in no way means that "there will never be a feature that prevents the deleting of immutables". This item is simply not made to address the default behavior of the feature.

That is why my colleague also suggested that a feature request/enhancement item is logged in our feedback portal.

What you're saying is a valid scenario and there could be an option that makes the immutables non-deletable as well.

We'll also look into updating our documentation for the moment as I do agree that it isn't very clear what "cannot be edited by the user means". Some will take this information as "the user cannot change the text content or styles", others will take it as "the user can neither change the text, nor delete it".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug C: Editor FP: Completed Sync status with associated Feedback Item jQuery SEV: Medium
Projects
None yet
Development

No branches or pull requests

6 participants