#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)
Change History (4)
Changed 14 years ago by
Attachment: | Language Direction.htm added |
---|
comment:1 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
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 14 years ago by
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 Changed 14 years ago by
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.
Sample file to replicate the Language Direction Issue