Open
Bug 753664
Opened 12 years ago
Updated 2 years ago
Missing dir=rtl on Firefox dialogs that starts with an English letter
Categories
(Toolkit :: General, defect)
Tracking
()
NEW
People
(Reporter: tomer, Unassigned)
References
(Blocks 2 open bugs)
Details
(Keywords: rtl)
Attachments
(2 files)
18.80 KB,
image/png
|
Details | |
1.47 KB,
patch
|
dao
:
review-
|
Details | Diff | Splinter Review |
When starting Firefox while we have a locked profile, it appears that the error message lost its direction. I suspect this is a regression as I never seen that before. Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0 Steps to reproduce: a. Open Firefox. b. Try to open again the same profile.
Reporter | ||
Comment 1•12 years ago
|
||
Comment on attachment 622639 [details]
screenshot
The word "Firefox" should be the first in the paragraph ("Firefox is already open"), and on RTL locales should be the first word from the right.
Comment 2•12 years ago
|
||
I guess this is a consequence of the HTML5 spec making alerts have auto-direction (implemented in bug 652550). Unfortunately this will be a recurring problem in RTL localizations. I'm not sure if there is a more elegant and general solution than adding an RTL mark whenever the text of an alert happens to begin with an LTR word. OTOH, I think one could make a case for making *all* chrome alerts follow the locale direction. This isn't necessarily even against the HTML spec, since the provision quoted at bug 652550 comment 13 can reasonably be interpreted as only applying to page scripts and not to alerts coming from the UI. If so there will be some alerts that are left untranslated and appear as RTL even though the content is LTR, but I don't think that's such a tragedy.
Blocks: 652550
Comment 3•12 years ago
|
||
(In reply to Simon Montagu from comment #2) I agree with Simon on all points.
Comment 4•12 years ago
|
||
So what we want to do is apply different CSS to a commonDialog or tabPrompt depending on whether it is opened from chrome or content. I have no idea how to make that distinction
Reporter | ||
Comment 5•12 years ago
|
||
(In reply to Simon Montagu from comment #4) > So what we want to do is apply different CSS to a commonDialog or tabPrompt > depending on whether it is opened from chrome or content. I have no idea how > to make that distinction As a workaround, we can add RLM in the beginning of each message. I'd prefer not to add more rules to intl.css as it is very difficult to maintain, but doing so will lead to the following problems: * How are we going to find each dialog box at risk? (Is it possible to automate it somehow?) * Having this workaround could be temporary solution, but there is nothing more permanent than temporary solution, so we'd need to document how to deal with such dialog boxes in the future. Is there a better and more HTML5-ish solution to how to deal with such problems we should be aware of?
Reporter | ||
Updated•12 years ago
|
Summary: No RTL on Firefox locked profile dialog message → Missing dir=rtl on Firefox dialogs that starts with an English letter
Comment 6•12 years ago
|
||
dolske, can you advise me how to determine whether a commonDialog or tabPrompt is being opened from chrome or content?
Reporter | ||
Comment 7•12 years ago
|
||
(In reply to Simon Montagu from comment #6) > dolske, can you advise me how to determine whether a commonDialog or > tabPrompt is being opened from chrome or content? Maybe it's time to propose second parameter to window.alert for features, similar to the third parameter on window.open, and have a feature for message direction similar to dir=(rtl|ltr) on HTML. https://developer.mozilla.org/en-US/docs/DOM/window.open https://developer.mozilla.org/en-US/docs/DOM/window.alert
Comment 8•12 years ago
|
||
Assignee: nobody → smontagu
Attachment #682561 -
Flags: review?(dolske)
Updated•12 years ago
|
Component: Untriaged → General
Product: Firefox → Toolkit
Version: 13 Branch → unspecified
Comment 9•12 years ago
|
||
Comment on attachment 682561 [details] [diff] [review] Using @-moz-document to reset unicode-bidi on chrome documents >+/* reset unicode-bidi to normal in chrome documents (bug 753664) */ >+@-moz-document url-prefix("chrome://") { >+ #info\.body { >+ unicode-bidi: normal; >+ } >+} indentation is messed up (too many spaces and a tab stop) Both and commonDialog.css and tabprompts.css are chrome-only, so the @-moz-document restriction isn't needed.
Attachment #682561 -
Flags: review?(dolske) → review-
Comment 10•12 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #9) > Both and commonDialog.css and tabprompts.css are chrome-only, so the > @-moz-document restriction isn't needed. I can't understand this. Adding unicode-bidi: plaintext in these files fixed bug 652550 for alerts from web content, and the patch here doesn't seem to regress that. In any case, if you want to suggest a better way to distinguish between alerts from content and alerts from chrome in order to fix this bug, I'm all ears.
Comment 11•12 years ago
|
||
The prompt document itself is always a chrome document, as dao suggests. What you care to distinguish is whether it was _triggered_ from content, which isn't something you can do with @-moz-document. I'm not sure what the best way to do that is, we may need to adjust the prompt API or introduce a new flag or something.
Comment 13•2 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: smontagu → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•