Opened 7 years ago

Closed 7 years ago

#5911 closed Bug (fixed)

BIDI: List items should support and retain correct base language direction

Reported by: Damian Owned by: Tobiasz Cudnik
Priority: Normal Milestone: CKEditor 3.4
Component: General Version:
Keywords: IBM Review+ Cc: Satya Minnekanti, joek

Description

It should be possible to set correct base language direction for graphical items such as numbered and bullet lists.

When creating a list from some existing content, the new list should retain the original language direction.

e.g. the following selection

<p dir="rtl">
   Line 1 <br/>
   Line 2 <br/>
   Line 3 <br/>
</p>

should become

<ul dir="rtl">
	<li>asdasdsadas</li>
	<li>sdfsdfsdfsdfsdf</li>
	<li>sdfsdfsdfsdfsdfsdf</li>
</ul>

the operation should also be reversible.

Attachments (3)

5911.patch (1.1 KB) - added by Tobiasz Cudnik 7 years ago.
5911_2.patch (2.3 KB) - added by Tobiasz Cudnik 7 years ago.
5911_3.patch (2.3 KB) - added by Tobiasz Cudnik 7 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 7 years ago by Tobiasz Cudnik

Owner: set to Tobiasz Cudnik
Status: newassigned

Changed 7 years ago by Tobiasz Cudnik

Attachment: 5911.patch added

comment:2 Changed 7 years ago by Tobiasz Cudnik

Keywords: Review? added

I will implement dialog extensions for language direction selection together with table element.

comment:3 Changed 7 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

Ok, the provided solution is simplistic, but good for the generic usage case. It works well when "creating" lists, but the fix for the opposite, "removing" lists, is still not there, so we loose the dir attribute when removing lists.

Changed 7 years ago by Tobiasz Cudnik

Attachment: 5911_2.patch added

comment:4 Changed 7 years ago by Tobiasz Cudnik

Keywords: Review? added; Review- removed

comment:5 Changed 7 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed
// Should we set DIR attribute on this one ?

Well... more or less...

We don't need the dir creation on that "else" block, but we can instead simply force it entering on the "if" block if "dir" is defined. In that case, it'll create a <div dir="...">.

comment:6 Changed 7 years ago by Frederico Caldeira Knabben

Additionally, it looks like the code throws error in IE when creating an editor.

comment:7 Changed 7 years ago by Tobiasz Cudnik

Keywords: Review? added; Review- removed

I hope i've got you point right adding the variable dir to the condition. It doesn't seem to cause any issues.

I can't reproduce any problem on IE after testing all 3 versions of it. Could you please drop some hint about it ?

Changed 7 years ago by Tobiasz Cudnik

Attachment: 5911_3.patch added

comment:8 in reply to:  7 Changed 7 years ago by Frederico Caldeira Knabben

Replying to tobiasz.cudnik:

I can't reproduce any problem on IE after testing all 3 versions of it. Could you please drop some hint about it ?

Sorry, my confusion. This problem is with #5909.

comment:9 Changed 7 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:10 Changed 7 years ago by Tobiasz Cudnik

Resolution: fixed
Status: assignedclosed

Fixed with [5677].

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