Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#7379 closed Bug (invalid)

Language direction attr does not default to 'LTR' when no direction value is set.

Reported by: Rajasimhan Owned by:
Priority: Normal Milestone:
Component: Core : BiDi Version: 3.5.2
Keywords: Oracle Cc: senthil.kumaran@…

Description

When the language direction attribute is not set explicitly then it defaults to 'ltr'. The problem occurs when we toggle between 'ltr' and 'rtl' languages. When we change it to 'rtl' for language like arabic the text direction changes to right to left. But when we change the language back to English and if we do not change the direction to 'ltr' the direction remains as 'rtl' even for English language.

Whats expected is that if we do not set the language direction or language it is defaulted to 'en' and 'ltr'. But this is not happening. This is causing a problem in our application. We do not explicitly set the direction for english. So when we move from arabic to english the text direction still appears to be 'rtl' instead of being 'ltr'.

I have attached a sample file wherein you can see this behavior. In the script i had not set the language direction to 'ltr' when language is set to 'en' as this is how it function is our application. Please check this our.

Note: For some reason, in the sample html, you have to click the radio buttons 9 corresponding to the language) twice, every time for the editor to reload. As I was testing this out in a hurry I could not find out the reason. But I don't think thats crucial for the issue in question.

Attachments (1)

Language Direction.htm (1.2 KB) - added by Rajasimhan 9 years ago.
Sample file to replicate the Language Direction Issue

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by Rajasimhan

Attachment: Language Direction.htm added

Sample file to replicate the Language Direction Issue

comment:1 Changed 9 years ago by Frederico Caldeira Knabben

Resolution: invalid
Status: newclosed

That's because you're setting the global CKEDITOR.config object setting, which is used by all editor instances. You should rarely touch this object in the real world, setting the configurations "per instance" instead.

comment:2 Changed 9 years ago by Rajasimhan

Hi,

When we wish to set the language and direction property globally is not right to set the CKEDITOR.config object?

Also we had not faced this problem in earlier ckeditor releases where we were using the same CKEDITOR.config object and we consider this as a deviation from the expected behavior.

Thanks Rajasimhan

comment:3 in reply to:  description Changed 9 years ago by Frederico Caldeira Knabben

Replying to Rajasimhan:

In the script i had not set the language direction to 'ltr' when language is set to 'en' as this is how it function is our application.

That's the problem. You're NOT *always* setting CKEDITOR.config.contentsLangDirection.

In any case, setting CKEDITOR.config properties *is* wrong and has never been recommended. If you really want to do so, do that *before* creating editor instances, not after it.

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