The default bug view has changed. See this FAQ.

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

RESOLVED DUPLICATE of bug 150568

Status

()

Core
Layout: Text
--
major
RESOLVED DUPLICATE of bug 150568
13 years ago
9 years ago

People

(Reporter: Craig R. Cummings, Assigned: mkaply)

Tracking

({rtl})

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: DUPEME, [oracle-nls])

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
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.

Updated

13 years ago
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.
Created attachment 145675 [details]
The testcase, plus the suggested workaround
(Reporter)

Comment 3

13 years ago
(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
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
(Reporter)

Updated

13 years ago
Whiteboard: DUPEME → DUPEME, [oracle-nls]
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl

Updated

9 years ago
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.