Closed Bug 979653 Opened 6 years ago Closed 6 years ago

Ctrl+Shift+X does not work in URL bar in RTL locales

Categories

(Firefox :: Address Bar, defect)

29 Branch
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 31
Tracking Status
firefox28 --- unaffected
firefox29 + verified
firefox30 + verified
firefox31 + verified

People

(Reporter: mvocom, Assigned: Gijs)

References

Details

(Keywords: regression, Whiteboard: p=0 s=it-31c-30a-29b.2 [qa!])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140303004002

Steps to reproduce:

Ctrl+Shift+X does not work in URL bar.

I use RTL (Hebrew), and it's important for me to be able to change direction.
Hi,

This bug is too vague. Can you provide more information?
When does it happen?
Does it happen in a certain Firefox version?
Flags: needinfo?(mvocom)
FF 29.
The text direction is FIXED to the right.  

In previous versions (FF 27, I haven't tried v28) it was possible to change text direction in the URL bar.
Flags: needinfo?(mvocom)
Can you go to "about:config" and search for "bidi.browser.ui" and set that from "false" to "true"

restart Firefox then try CTRL + SHIFT + X
Flags: needinfo?(mvocom)
Here's another tip

Go to "about:config" type "bidi.direction" set that from "1" to "2" and restart.
Thank you.

It doesn't work.
Flags: needinfo?(mvocom)
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86 → All
Hi Moses,

Could you please update me?
This issue is highly important to me.

Thanks.
Flags: firefox-backlog+
Summary: Ctrl+Shift+X does not work in URL bar → Investigation - Ctrl+Shift+X does not work in URL bar
Whiteboard: p=5
Component: Untriaged → Location Bar
Flags: needinfo?(gijskruitbosch+bugs)
This works on 28, it seems...
Uh, interestingly, it seems the shortcut still works when using an LTR build, but not when using an RTL build... :-\
This looks like bug 675579. Ehsan, can you have a look, please? The search bar works, but the URL bar doesn't, and this is quite a bad regression. The issue only appears in RTL builds (or in LTR builds with the "Force RTL" add-on installed and the build set to behave as RTL). We'll need to move fast in order to still fix this for 29. :-(
Blocks: 675579
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(ehsan)
Final regression pushlog: http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=9bcc52594322&tochange=7eb615c086e8
Summary: Investigation - Ctrl+Shift+X does not work in URL bar → Investigation - Ctrl+Shift+X does not work in URL bar in RTL locales
Yes, I'd be happy to fix this.  Can you please point me to the code which deals with the location bar direction?  Bug 675579 might be breaking the assumptions of that code...
Flags: needinfo?(ehsan) → needinfo?(gijskruitbosch+bugs)
(In reply to :Ehsan Akhgari (lagging on bugmail, needinfo? me!) from comment #12)
> Yes, I'd be happy to fix this.  Can you please point me to the code which
> deals with the location bar direction?  Bug 675579 might be breaking the
> assumptions of that code...

I am not aware of there being specific code for it... it will just use the generic cmd_switchTextDirection editor command, AFAICT.
Huh, actually, it seems like:

1) we set the dir=ltr/rtl attribute correctly in the editor switch text direction code;
2) the CSS in this media query:

http://mxr.mozilla.org/mozilla-central/source/layout/style/forms.css#82

is broken because the dir attribute gets set on the input element instead of the anonymous div now (per attachment 8360729 [details] [diff] [review] from bug 675579.

Ehsan, is that right?
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(ehsan)
Might as well make this a patch. This addresses the regression. I did notice that, in RTL mode, it seems the first ctrl-shift-x call has no effect, presumably because we end up setting the dir attribute to rtl instead of ltr, even though the document is in rtl mode already and so this doesn't actually switch text direction. However, that was an issue before and I don't think we should block this bug on it. I'm happy to file a followup if that makes sense (I'm also not sure how we'd fix it - presumably we'd need to look at computed style, which would trigger layout flushes, which makes me sad)
Attachment #8403581 - Flags: review?(ehsan)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(ehsan)
Attachment #8403581 - Flags: review?(ehsan) → review+
(In reply to :Gijs Kruitbosch from comment #15)
> Might as well make this a patch. This addresses the regression. I did notice
> that, in RTL mode, it seems the first ctrl-shift-x call has no effect,
> presumably because we end up setting the dir attribute to rtl instead of
> ltr, even though the document is in rtl mode already and so this doesn't
> actually switch text direction. However, that was an issue before and I
> don't think we should block this bug on it. I'm happy to file a followup if
> that makes sense (I'm also not sure how we'd fix it - presumably we'd need
> to look at computed style, which would trigger layout flushes, which makes
> me sad)

Please file a follow-up on it.  I actually thought that the editor code takes the direction of the element into account properly, there might be a bug in that logic.
remote:   https://hg.mozilla.org/integration/mozilla-inbound/rev/bf99640d19e5
Whiteboard: p=5 → [fixed-in-inbound] p=5
In FF versions prior to v29:

The first Ctrl+Shift+X call indeed has no effect.
I've been using a small extension calling cmd_switchTextDirection TWICE on each new window.
Aligning the URL bar text to the right in RTL mode makes no sense; - we hardly ever use non-Latin characters in that bar.

*

If you are going to fix the regression in v29, it might be a good idea to change the default alignment to the left.

Thanks.
Depends on: 993773
This issue is frequently discussed in RTL forums.
Many users often ask to align the text to the left.
Yaron, please file a new bug for the directionality issue and CC me on it.  Thanks!
Hi Ehsan,

https://bugzilla.mozilla.org/show_bug.cgi?id=993806

Just to save me some time, where is forms.css located in omni.ja?

Thanks.
(In reply to Yaron from comment #21)
> Hi Ehsan,
> 
> https://bugzilla.mozilla.org/show_bug.cgi?id=993806

Thanks!

> Just to save me some time, where is forms.css located in omni.ja?

On my OS X machine, it's at ./chrome/toolkit/res/forms.css.  I think the location should be the same in all platforms.
Thank you. I appreciate it.
And thanks for fixing the regression.
https://hg.mozilla.org/mozilla-central/rev/bf99640d19e5
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 31
Thank you Gijs and Ehsan.
Comment on attachment 8403581 [details] [diff] [review]
fix dir attribute checks for url field in rtl mode,

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 675579
User impact if declined: users of RTL locales in Firefox are stuck with a right-aligned location bar
Testing completed (on m-c, etc.): on m-c
Risk to taking this patch (and alternatives if risky): low, tiny CSS change to reflect changes made in bug 675579
String or IDL/UUID changes made by this patch: none
Attachment #8403581 - Flags: approval-mozilla-beta?
Attachment #8403581 - Flags: approval-mozilla-aurora?
Attachment #8403581 - Flags: approval-mozilla-beta?
Attachment #8403581 - Flags: approval-mozilla-beta+
Attachment #8403581 - Flags: approval-mozilla-aurora?
Attachment #8403581 - Flags: approval-mozilla-aurora+
Hi Anthony, can you review if this resolved bug will need further verification.  Thanks.
Flags: needinfo?(anthony.s.hughes)
Summary: Investigation - Ctrl+Shift+X does not work in URL bar in RTL locales → Ctrl+Shift+X does not work in URL bar in RTL locales
Whiteboard: [fixed-in-inbound] p=5 → [fixed-in-inbound] p=0 s=it-31c-30a-29b.2
We should definitely spotcheck this with a few RTL locales. Florin, please make sure this gets assigned and tested.
Flags: needinfo?(anthony.s.hughes)
Keywords: verifyme
QA Contact: florin.mezei
Whiteboard: [fixed-in-inbound] p=0 s=it-31c-30a-29b.2 → [fixed-in-inbound] p=0 s=it-31c-30a-29b.2 [qa+]
QA Contact: florin.mezei → catalin.varga
Can I please get some RTL locales in order to verify the bug (at least Hebrew and Arabic).
This bug is fixed on Nightly so on ftp no locales are available.
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to Catalin Varga [QA][:VarCat] from comment #29)
> Can I please get some RTL locales in order to verify the bug (at least
> Hebrew and Arabic).
> This bug is fixed on Nightly so on ftp no locales are available.

Arabic and Hebrew should be a good enough sample size. You can get l10n builds from ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-central-l10n/
Flags: needinfo?(gijskruitbosch+bugs)
I've verified this bug using:
FF 31 ar and he localization
Build id: 20140410030200
OS: Win 7 x64, Mac Os x 10.9, Ubuntu 13.04 x64

I will verify for Aurora and Beta when localized builds containing the fix will be available for all operating systems.
I've verified this bug using:

FF 30 aurora ar and he localization
Build id: 20140411004002
OS: Win 7 x64, Mac Os x 10.9, Ubuntu 13.04 x64

FF 29.0b7 ar and he localization
Build id: 20140410150427
OS: Win Xp x86, Mac Os x 10.9, Ubuntu 13.04 x64
Status: RESOLVED → VERIFIED
Keywords: verifyme
Whiteboard: p=0 s=it-31c-30a-29b.2 [qa+] → p=0 s=it-31c-30a-29b.2 [qa!]
FF 32 - The hook-indicator is only half displayed (1px).  
Why not change the code and show 2px?
You need to log in before you can comment on or make changes to this bug.