Unplanned
Last Updated: 28 Apr 2020 08:30 by ADMIN
Mihajlo
Created on: 24 Apr 2020 18:35
Category: RichTextEditor
Type: Bug Report
1
Paragraph alignment cannot be changed if paragraph is selected over the paragraph mark

Run the Word-inspired project. Select the one whole paragraph, right below the Overview header, but so that caret is at the beginning of the next paragraph. Change text alignment to Justify. Then try to change text alignment to Left. It will not turn back to Left. Probable reason is that caret is at beginning of the next paragraph whose alignment is Left, so app thinks it should change it to Justify instead. This over-eagerness is described in forum thread ChangeParagraphTextAlignment is over-eager to change alignment. But in this case there is no workaround.

The solution is to set the value instead of toggle it, like the Word does. If text alignment was Left then setting to Left should again set it to Left. Also, caret position should not change the outcome of the action. Only the contents of the selection is relevant in deciding if action can be safely skipped.

4 comments
ADMIN
Dimitar
Posted on: 28 Apr 2020 08:30

Hi Mihajlo,

Thank you for the additional information. I was able to reproduce the issue consistently. Unfortunately, I cannot suggest a workaround for it

Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Mihajlo
Posted on: 27 Apr 2020 13:52
Also in empty Word-inspired project. Maybe that's what you meant by sample project.
Mihajlo
Posted on: 27 Apr 2020 13:41

I can see it in both the demo project and my project. If one paragraph is left aligned and next paragraph is center-aligned, and we select just the whole first paragraph, but so that caret is at the start of centered paragraph, we can't center-align the first paragraph.

It's a combination of over-eagerness to toggle the alignment, and obtaining the selection alignment state by caret position. Maybe even both issues should be fixed.

ADMIN
Dimitar
Posted on: 27 Apr 2020 12:44

Hi Mihajlo,

I  was able to reproduce this with the demo application. I have approved the item and updated your Telerik points

On my side, I am able to reproduce it in the demo application only. Are you able to reproduce it in your real project or in a sam[ple application? 

I am looking forward to your reply.

Regards,
Dimitar
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.