The default bug view has changed. See this FAQ.

[RTL] Scratchpad JavaScript editor should be LTR

VERIFIED FIXED

Status

()

Firefox
Developer Tools
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: tomer, Assigned: smontagu)

Tracking

({rtl})

unspecified
Points:
---

Firefox Tracking Flags

(firefox6+ fixed, firefox7+ fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Since JavaScript Scratchpad is intended for code input, I'd suggest to override its direction for RTL languages, so it would be aligned to the left even when the UI is Arabic, Persian or Hebrew. 


As for l10n, this change would impact few strings, or more exactly the comment in the default empty Scratchpad. For Hebrew I've already included a fix for that so the comment will keep the text direction even if the textarea direction will be changed (using RLE..PDF for each line). 
http://hg.mozilla.org/releases/l10n/mozilla-aurora/he/annotate/febdf55b4e80/browser/chrome/browser/scratchpad.dtd#l122
http://hg.mozilla.org/releases/l10n/mozilla-aurora/he/annotate/febdf55b4e80/browser/chrome/browser/scratchpad.properties#l35
(Reporter)

Updated

6 years ago
Version: 6 Branch → unspecified
(Reporter)

Comment 1

6 years ago
Created attachment 543583 [details]
screenshot
this is not good.

Since this is just a text area, can we force it to run as LTR all the time?
(Reporter)

Comment 3

6 years ago
(In reply to comment #2)
> Since this is just a text area, can we force it to run as LTR all the time?
I am not sure if is actually 'just a text area', as the regular key binding for switching text direction (ctrl-shift-x) is somehow missing from this textarea.
(Reporter)

Comment 4

6 years ago
(In reply to comment #3)
> switching text direction (ctrl-shift-x) is somehow missing from this
> textarea.
see Bug 669011
(Assignee)

Comment 5

6 years ago
Created attachment 544034 [details] [diff] [review]
Make the textbox left-to-right
Assignee: nobody → smontagu
Attachment #544034 - Flags: review?(mihai.sucan)

Comment 6

6 years ago
Release drivers don't need to track this but we would be very open to taking a fix. When this patch is reviewed, please request approval on the patch for Beta [6].
tracking-firefox6: ? → -
Comment on attachment 544034 [details] [diff] [review]
Make the textbox left-to-right

This looks fine. Thank you!

I would've expected there is, like dir=ltr|rtl in HTML, an attribute on the xul:textbox element that we can use to change the language direction.
Attachment #544034 - Flags: review?(mihai.sucan) → review+
(Assignee)

Comment 8

6 years ago
(In reply to comment #7)
> I would've expected there is, like dir=ltr|rtl in HTML, an attribute on the
> xul:textbox element that we can use to change the language direction.


XUL has a dir attribute, but it has different semantics. We did discuss possibly adding an attribute equivalent to HTML's dir in bug 548206.
tracking-firefox6: - → ?
(Assignee)

Comment 9

6 years ago
http://hg.mozilla.org/mozilla-central/rev/4e151ddc06c0
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Assignee)

Comment 10

6 years ago
Comment on attachment 544034 [details] [diff] [review]
Make the textbox left-to-right

Asking approval for aurora and beta. This is a trivial and minimal-risk patch which will make a much better experience for Scratchpad users in RTL locales.
Attachment #544034 - Flags: approval-mozilla-beta?
Attachment #544034 - Flags: approval-mozilla-aurora?
thanks for the quick patch, Simon!

Updated

6 years ago
Attachment #544034 - Flags: approval-mozilla-beta?
Attachment #544034 - Flags: approval-mozilla-beta+
Attachment #544034 - Flags: approval-mozilla-aurora?
Attachment #544034 - Flags: approval-mozilla-aurora+

Updated

6 years ago
tracking-firefox6: ? → -
(Assignee)

Comment 12

6 years ago
http://hg.mozilla.org/releases/mozilla-aurora/rev/735ddcfe8128
http://hg.mozilla.org/releases/mozilla-beta/rev/8375fba12d16
status-firefox6: --- → fixed
status-firefox7: --- → fixed
tracking-firefox6: - → ?

Updated

6 years ago
tracking-firefox6: ? → +
tracking-firefox7: --- → +
Verified on معرّف البناء: Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0 and معرّف البناء: Mozilla/5.0 (X11; Linux i686; rv:7.0a2) Gecko/20110714 Firefox/7.0a2
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.