Unplanned
Last Updated: 19 Jul 2021 11:00 by ADMIN
Rohit
Created on: 23 Jun 2021 17:06
Category: Editor
Type: Bug Report
1
Bullets not removed

Hi,

 

Bullets are not removed when content is deleted.

  1. Create text editor on a div
  2. Input some text
  3. Make it bold and underline
  4. Make it bulleted
  5. Add few more bullets
  6. Select all bullets
  7. Press backspace

Observe that two bullet points remain

 

Attached Files:
3 comments
ADMIN
Dimitar
Posted on: 19 Jul 2021 11:00

Hello,

Node.textContent returns the text content of the node and its descendants. The remaining empty bullets are descendants of the editor element, but as they have no text content, it is expected that textContent returns empty string. I cannot advise if this approach for determining if the content is empty is recommended, as it may return true in scenarios other than the one with bullets, e.g. an empty table added.
The Editor provides a value() method, which returns the value and the respective bullet nodes are present when using it.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Madhan
Posted on: 12 Jul 2021 11:05

Hello Team, when this is issue happens is there a way to identify that the content is empty.  With below code, we get the results of isEmpty as true even when bullets are not fully cleared.  Please confirm if this is also a known issue.

 

  public isEmpty(): boolean {
    return this.helper.isStringNullOrEmpty(this.nativeElement?.textContent?.trim());
  }

  public isStringNullOrEmpty(entity: string): boolean {
    return entity === undefined || entity === null || entity === '';
  }
ADMIN
Dimitar
Posted on: 24 Jun 2021 14:42

Hi ,

Thank you for this feedback, I am converting it to a publicly visible bug report, which may be tracked for any progress on it. Currently there is no workaround for it and if any is found, it will be included in the thread. As a small token of gratitude for this report, I updated your Telerik points.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.