Closed Bug 237931 Opened 20 years ago Closed 20 years ago

[BiDi] RTL Radio button, checkbox controls don't flip/mirror correctly

Categories

(Core :: Layout: Text and Fonts, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 150568

People

(Reporter: craig.cummings, Assigned: mkaply)

Details

(Keywords: rtl, Whiteboard: DUPEME, [oracle-nls])

Attachments

(1 file)

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.
Whiteboard: DUPEME
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.
(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.
> 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 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME → DUPEME, [oracle-nls]
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: