Opened 3 years ago

Closed 2 years ago

#14721 closed Bug (expired)

convertToPx function in RTL mode

Reported by: Irina Owned by: Tade0
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: IBM Cc: Satya Minnekanti

Description

In convertToPx function style attribute is always set to left even when editor is in RTL mode, e.g.

calculator = CKEDITOR.dom.element.createFromHtml( '<div style="position:absolute;left:-9999px;' +
                        'top:-9999px;margin:0px;padding:0px;border:0px;"' +
                        '></div>', CKEDITOR.document );

Should this be replaced with 'right' for RTL mode?

Change History (9)

comment:1 Changed 3 years ago by Jakub Ś

Status: newconfirmed
Version: 4.5.10 (GitHub - master)4.0

Goal of this function is to convert non-px to px but it makes sense to move it to the right in RTL mode so as to not show it by accident.

Maybe the values should be made bigger. The 9999px may be too small these days.

comment:2 Changed 2 years ago by Marek Lewandowski

Milestone: CKEditor 4.6.2
Priority: NormalNice to have (we want to work on it)

comment:3 Changed 2 years ago by Tade0

Owner: set to Tade0
Status: confirmedassigned

comment:4 Changed 2 years ago by Tade0

Status: assignedreview

Interestingly this function had no test coverage, so I added them.

As mentioned earlier in principle this shouldn't be dependant on LTR-RTL, so I simply added a "1" before each value.

Changes pushed to branch:t/14721.

comment:5 Changed 2 years ago by Marek Lewandowski

Status: reviewassigned

While reviewing I saw that it should be pretty much language direction-independent. This element is inserted directly into the body and is positioned absolutely so moving it outside left border of body will take effect on both ltr and rtl languages.

@irina can I ask you to provide a case where it fails?

comment:6 Changed 2 years ago by Marek Lewandowski

Status: assignedpending

comment:7 Changed 2 years ago by Marek Lewandowski

Milestone: CKEditor 4.6.2

comment:8 Changed 2 years ago by Marek Lewandowski

Priority: Nice to have (we want to work on it)Normal

comment:9 Changed 2 years ago by Jakub Ś

Resolution: expired
Status: pendingclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy