Closed Bug 1145546 Opened 9 years ago Closed 9 years ago

[RTL] input fields don't autoscroll to keep the caret in view with unicode-bidi: [-moz-]plaintext

Categories

(Core :: Layout, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

()

RESOLVED FIXED
mozilla39
blocking-b2g 2.2+
Tracking Status
firefox37 --- wontfix
firefox38 --- wontfix
firefox39 --- fixed
b2g-v2.2 --- verified
b2g-master --- verified

People

(Reporter: lulu.tian, Assigned: smontagu)

References

Details

(Keywords: rtl)

Attachments

(5 files)

Attached video video.MP4
[1.Description]:
[RTL][v3.0][Settings] When we log in a Firefox account with long email address, the first character will not be indented when we input the long email address.
See attachment:video.MP4

[2.Testing Steps]: 
1. Set system language as Arabic.
2. Launch Settings -> Firefox Accounts -> Create Account or Sign In.
3. Input a long email address.

[3.Expected Result]: 
3. The first character should be indented when we input a long email address.

[4.Actual Result]: 
3. The first character will not be indented when we input a long email address.

[5.Reproduction build]: 
Flame 2.2 build: unaffected
Build ID               20150319002500
Gaia Revision          9043c11f699c15bb6072422d1dad6518d1b5ddda
Gaia Date              2015-03-19 01:40:44
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/c0442d170bec
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150319.042028
Firmware Date          Thu Mar 19 04:20:38 EDT 2015
Bootloader             L1TC000118D0

Flame 3.0 build: affected
Build ID               20150319160212
Gaia Revision          c39e15f631de80c69467fda0d4ea0bcda9e194ca
Gaia Date              2015-03-18 19:30:04
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/cbd0efcd976c
Gecko Version          39.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150319.193329
Firmware Date          Thu Mar 19 19:33:42 EDT 2015
Bootloader             L1TC000118D0

[6.Reproduction Frequency]: 
Always Recurrence,5/5

[7.TCID]: 
Free Test
QA Whiteboard: [rtl-impact]
Sue: I think you got the description of the bug wrong. Or maybe this is a language issue? "Indenting"
here doesn't make sense from the video I'm looking at. I will change the title of this bug to reflect the issue seen in the video. Please refile a bug about indenting if there is in fact a bug somewhere.

Triage P2 -- This denies information from users who have a very long email address, so nominating as well
blocking-b2g: --- → 2.2?
Priority: -- → P2
Summary: [RTL][Settings]The first character will not be indented when we input a long email address. → [RTL][Settings]Users with longer email addresses can't see what they are inputting
(In reply to Delphine Lebédel [:delphine - use need info] from comment #1)
> Sue: I think you got the description of the bug wrong. Or maybe this is a
> language issue? "Indenting"
> here doesn't make sense from the video I'm looking at. I will change the
> title of this bug to reflect the issue seen in the video. Please refile a
> bug about indenting if there is in fact a bug somewhere.
> 
> Triage P2 -- This denies information from users who have a very long email
> address, so nominating as well

Hi Delphine,
Thanks. :)
This issue is talking about, when users typed a very long email address, the first input characters can't move to left, so users can't see what they are inputting.
Triage: not Gaia bug, more like layout or platform issue. Put to layout first, please help to change component if it's not correct, thanks.
Component: Gaia::Settings → Layout
Product: Firefox OS → Core
Summary: [RTL][Settings]Users with longer email addresses can't see what they are inputting → [RTL]Users with longer email addresses can't see what they are inputting
This was presumably exposed by bug 1137021, but it seems like a layout bug with autoscrolling of input fields. Normally the field scrolls the text while the user types, and keeps the point in the text where characters are being added in view, and this Just Works with all combinations of right-to-left and left-to-right text and field direction. However it stops working with unicode-bidi: -moz-plaintext where the direction of the text is the opposite of the direction of the field.
Keywords: rtl
Summary: [RTL]Users with longer email addresses can't see what they are inputting → [RTL] input fields don't autoscroll to keep the caret in view with unicode-bidi: [-moz-]plaintext
Attached patch PatchSplinter Review
N.B.1: There is a very similar bug with input fields with vertical text, but that can wait for its own patch and not confuse the issue here.

N.B.2: I'm not sure whether it would be a good idea to change nsLayoutUtils::GetScrolledRect's |aDirection| to take NS_BIDILTR/NS_BIDIRTL instead of NS_STYLE_DIRECTION_LTR/NS_STYLE_DIRECTION_RTL. It would make this callsite significantly clearer, but the other callsite in GetScrollRectSizeForOverflowVisibleFrame in dom/base/Element.cpp a bit less so.

Or on second thoughts, I suppose the upcoming fix to the vertical text issues will require passing in a WritingMode anyway, so that will become moot.
Assignee: nobody → smontagu
Attachment #8583144 - Flags: review?(jfkthame)
Status: NEW → ASSIGNED
blocking-b2g: 2.2? → 2.2+
Attachment #8583144 - Flags: review?(jfkthame) → review+
https://hg.mozilla.org/mozilla-central/rev/c309c399dfad
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Please request b2g37 approval on this when you get a chance.
Flags: needinfo?(smontagu)
Test case has been added in moztrap:
https://moztrap.mozilla.org/manage/case/15742/
Flags: in-moztrap+
According to the steps in Comment 0, this issue is verified pass on latest Flame 3.0 build.
See attachment: Verify1_Flame3.0_Pass.mp4
Reproducing Rate:0/10

Flame 3.0 build: 
Build ID               20150327160203
Gaia Revision          9cc496cecc37d7a29f9279827cdf6e4891211f67
Gaia Date              2015-03-27 13:55:18
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/44e454b5e93b
Gecko Version          39.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150327.192632
Firmware Date          Fri Mar 27 19:26:42 EDT 2015
Bootloader             L1TC000118D0
QA Whiteboard: [rtl-impact] → [rtl-impact][MGSEI-Triage+]
Comment on attachment 8583144 [details] [diff] [review]
Patch

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): The underlying layout bug has apparently existed ever since support for unicode-bidi: plaintext was introduced in bug 662288, but it has appeared in specific fields in Gaia UI since bug 1137021
User impact if declined: Users in RTL languages unable to see text while typing if it exceeds the width of the text field
Testing completed: Baked on trunk since 2015-03-26. Tested with input fields in all combinations of direction and rtl/ltr languages.
Risk to taking this patch (and alternatives if risky): The patch only affects fields with unicode-bidi: plaintext and should have no side-effects outside that.
String or UUID changes made by this patch: None
Flags: needinfo?(smontagu)
Attachment #8583144 - Flags: approval-mozilla-b2g37?
Attachment #8583144 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
According to the steps in Comment 0, this issue is verified pass on latest Flame 2.2 build.
See attachment: Verify2_Flame2.2_Pass.mp4
Reproducing Rate:0/10

Flame 2.2 build (Unaffected):
Build ID               20150401002624
Gaia Revision          8b3086ad3963f1707e2bee9094baccafffe161c4
Gaia Date              2015-03-31 21:48:06
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/20b67213a047
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150401.042225
Firmware Date          Wed Apr  1 04:22:36 EDT 2015
Bootloader             L1TC000118D0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: