Last Comment Bug 237931 - [BiDi] RTL Radio button, checkbox controls don't flip/mirror correctly
: [BiDi] RTL Radio button, checkbox controls don't flip/mirror correctly
Status: RESOLVED DUPLICATE of bug 150568
DUPEME, [oracle-nls]
: rtl
Product: Core
Classification: Components
Component: Layout: Text (show other bugs)
: Trunk
: x86 Windows 2000
: -- major (vote)
: ---
Assigned To: Mike Kaply [:mkaply]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-18 16:43 PST by Craig R. Cummings
Modified: 2008-07-31 02:41 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
The testcase, plus the suggested workaround (436 bytes, text/html)
2004-04-08 00:28 PDT, Simon Montagu :smontagu
no flags Details

Description Craig R. Cummings 2004-03-18 16:43:15 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7a) Gecko/20040219
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7a) Gecko/20040219

RTL Radio button, checkbox controls don't flip/mirror correctly. See actual and
expected results for details.

Reproducible: Always
Steps to Reproduce:
1. Create a file with the following HTML: 

<html dir="rtl">
<head>
<title>HTML TextArea</title>
<body>
<form>
<input type="radio">&#1587;&#1593;&#1581;&#1579;&#1602; &#1633;&#1634;&#1635; &#1588;&#1587;&#1576; Mozilla
<br>
<input type="checkbox"> Mozilla &#1587;&#1588;&#1610;&#1576; &#1636;&#1637;&#1638; &#1588;&#1587;&#1610;&#1576;
<br>

2. Open the HTML file with Mozilla.

Actual Results:  
The LTR text 'Mozilla' will be mirrored improperly/appear on wrong side (the
right) of the checkbox. Same problem with the radio button.

Expected Results:  
What should display instead is 'Mozilla' (running left-to-right) on the left
hand side of the checkbox and the Arabic text (running right-to-left) on the
left hand side of 'Mozilla'. The checkbox should appear on the very rightmost
part of the browser screen. The same applies to the radio button.
Comment 1 Simon Montagu :smontagu 2004-04-08 00:22:27 PDT
What is happening here is that the checkbox/radio button is participating in
reordering along with the text, as if it were a neutral character. I'm not sure
that this is in fact a bug.

A workaround is to add a &rlm; between the <input> and the left-to-right text.
Comment 2 Simon Montagu :smontagu 2004-04-08 00:28:36 PDT
Created attachment 145675 [details]
The testcase, plus the suggested workaround
Comment 3 Craig R. Cummings 2004-04-13 11:26:45 PDT
(In reply to comment #1)
> What is happening here is that the checkbox/radio button is participating in
> reordering along with the text, as if it were a neutral character. I'm not sure
> that this is in fact a bug.

This really is a bug. Other HTML forms controls, including the TEXT and BUTTON
type of the <input> control, all seem to inherit direction correctly. The
<input> RADIO and CHECKBOX InputTypes do not for some reason. 

BTW, It might be yet a separate bug, but the RADIO and CHECKBOX <input> types
don't respond correctly to explicit (not inherited) direction attributes, either.

> A workaround is to add a &rlm; between the <input> and the left-to-right text.

Thanks for the workaround. However, we are trying to develop agent-independent
HTML and use of the workaround would cause us to have more than one code path.
We believe the right solution is that we ought to be able to depend on agents
displaying HTML according to the prescribed inherited or explicit direction
attribute behaviour.
Comment 4 Simon Montagu :smontagu 2004-04-20 06:42:15 PDT
> Thanks for the workaround. However, we are trying to develop agent-independent
> HTML and use of the workaround would cause us to have more than one code path.

Does the workaround have a negative effect on any other agents? The rendering on
IE and Mozilla is identical.

> We believe the right solution is that we ought to be able to depend on agents
> displaying HTML according to the prescribed inherited or explicit direction
> attribute behaviour.

On further analysis I realize that the issue here is the <br>s rather than the
checkboxes, and this is a duplicate of bug 150568.

*** This bug has been marked as a duplicate of 150568 ***
Comment 5 :Ehsan Akhgari (busy, don't ask for review please) 2008-04-07 13:56:42 PDT
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).

Note You need to log in before you can comment on or make changes to this bug.