Closed Bug 300355 Opened 15 years ago Closed 15 years ago

multiple <a onclick="">...</a> tags don't work in RTL page!


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

Windows XP
Not set





(Reporter: pashazadeh, Assigned: mkaply)


(Keywords: rtl, testcase)


(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

If you visit a page with following source in Mozilla by clicking on both text
the javaScript assigned to second one is invoked!
but if I delete (dir="rtl") from page javaScripts work fine!

if I split two links in two paragraph (<p>) tags each one acts correctly, but...

<body dir="rtl"> 
	<p align="center">
		<a onclick="alert('abc');"> abc </a>
		<a onclick="alert('cde');"> cde </a>

Reproducible: Always

Steps to Reproduce:
1. save following HTML in a text file
2. double click on it, so FireFox opens it

Actual Results:  
click on each of text messages! both alert 'cde'!

Expected Results:  
clicking on 'abc' must alert 'abc' not 'cde'!
when I ommit dir="rtl" attribute from <body> tag everything goes fine!
Attached file testcase
I'm seeing this bug also in current trunk build.
Assignee: nobody → mozilla
Component: General → Layout: BiDi Hebrew & Arabic
Ever confirmed: true
Keywords: testcase
Product: Firefox → Core
QA Contact: general → zach
Version: unspecified → Trunk
Yes, I can reproduce it with mozilla 1.7.8 linux.
Attached file testcase 2
This testcase attempts to explain what's going on.

In the first paragraph, the red border only surrounds "cde", as expected.

In the second paragraph, the "cde" inside the second span is followed by an RTL
character, which, in accordance with the bidi algorithm, is placed to the left
of the first ("abc") span. This causes the second span to extend leftwards,
"covering" the first span.

The third paragraph is the most similar to the original testcase. Instead of an
RTL character, there is a space following the "cde". This space is treated as
an RTL character (in accordance with the bidi algorithm), so the end result is
similar to the second pagaraph.

Given this explanation, I'm not sure whether the bug is valid or not.
Sorry - the second and third paragraphs are reversed in the testcase vis-à-vis
the description in comment #4.
This could be a dupe of bug 178991
(In reply to comment #6)
> This could be a dupe of bug 178991

Yes, after looking into it I'm convinced that this is a dupe.

*** This bug has been marked as a duplicate of 178991 ***
Closed: 15 years ago
Resolution: --- → DUPLICATE
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.