Closed Bug 281361 Opened 20 years ago Closed 19 years ago

[RTL UI] tab navigation with left/right arrow keys moves in the wrong direction

Categories

(Core :: XUL, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta2

People

(Reporter: asaf, Assigned: asaf)

References

(Blocks 1 open bug)

Details

(Keywords: access, intl, rtl)

Attachments

(2 files, 1 obsolete file)

Starting from Gecko/20040722 builds (bug 175893), XUL <tab>s are focusable.
However, this functionality is broken in a RTL UI (Hebrew, Arabic, etc.).

STR:
1. aligning the interface to the right: add these rule to userChrome.css

window {
  direction: rtl;
}

2. Open 3 tabs
3. focus (double click) the second tab
4. Click the right arrow key.

ACTUAL RESULTS: last tab is focused.
EXPECTED RESULTS: first tab should be focused

same goes for the left arrow key, in reverse.
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.8beta
s/these/this even
Attached patch patch v1 (xpfe) (obsolete) — Splinter Review
Attachment #173615 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #173615 - Flags: review?(smontagu)
Can you test whether there is a visible impact in performance if you get the
computed style on the keypress instead of caching it?
Comment on attachment 173615 [details] [diff] [review]
patch v1 (xpfe)

>+        document.defaultView.getComputedStyle(this.tabbox, "").getPropertyValue("direction");
You can't be sure of having a tabbox (certainly not without writing code to
implement the getter!), I'd just get the computed style of the tabs themselves.
Also, in chrome, you're allowed to use window.getComputedStyle because we don't
have to be portable. And if [bz/dbaron say that] getComputedStyle is cheap
enough then I don't mind if you make this a property on the tab or inline it
into the handler, but you wouldn't make it a property here.
Attachment #173615 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #173615 - Flags: review?(smontagu)
bz	Anyway, the style context is cached
bz	The work done to serialize the style context data into CSS is not cached

seems to be cheap enough
Attached patch v1.1 (xpfe/)Splinter Review
Attachment #174585 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #174585 - Flags: review?(smontagu)
Attachment #173615 - Attachment is obsolete: true
Comment on attachment 174585 [details] [diff] [review]
v1.1 (xpfe/)

It would surprise me if people used the arrow keys to switch tabs much anyway.
Attachment #174585 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
QA Contact: tsahi_75
Comment on attachment 174585 [details] [diff] [review]
v1.1 (xpfe/)

Yeah, I think this is the Right Way to do this. r=me.
Attachment #174585 - Flags: review?(smontagu) → review+
Comment on attachment 174585 [details] [diff] [review]
v1.1 (xpfe/)

Checking in tabbox.xml;
/cvsroot/mozilla/xpfe/global/resources/content/bindings/tabbox.xml,v  <-- 
tabbox.xml
new revision: 1.34; previous revision: 1.33
done

leaving open for toolkit
Attached patch for toolkit/Splinter Review
Attachment #174921 - Flags: review?(mconnor)
Attachment #174921 - Flags: review?(mconnor) → review+
Checking in toolkit/content/widgets/tabbox.xml;
/cvsroot/mozilla/toolkit/content/widgets/tabbox.xml,v  <--  tabbox.xml
new revision: 1.19; previous revision: 1.18
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.8beta1 → mozilla1.8beta2
Blocks: 306980
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: tsahi_75 → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: