Closed Bug 876825 Opened 11 years ago Closed 10 years ago

Mixed LTR & RTL content support in text input fields and textarea

Categories

(Firefox OS Graveyard :: Gaia, defect)

defect
Not set
normal

Tracking

(blocking-b2g:1.4+, ux-b2g:2.1, b2g-v1.4 fixed, b2g-v2.0 fixed, b2g-v2.1 fixed, b2g-v2.2 verified, b2g-master verified)

VERIFIED FIXED
2.0 S6 (18july)
blocking-b2g 1.4+
ux-b2g 2.1
Tracking Status
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed
b2g-v2.2 --- verified
b2g-master --- verified

People

(Reporter: 7raivis, Assigned: nefzaoui)

References

Details

(Keywords: verifyme)

Attachments

(2 files, 1 obsolete file)

46 bytes, text/x-github-pull-request
timdream
: review+
Details | Review
46 bytes, text/x-github-pull-request
timdream
: review+
Details | Review
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36

Steps to reproduce:

You can fix this issue on adding dir=auto for the textarea field.
Issue under Geeksphone Kernel https://github.com/gp-b2g/gp-peak-kernel/issues/12
:yxl, any clue?
Flags: needinfo?(xyuan)
I've no experience of right-to-left support and I'm trying to understand what the problem is.
Flags: needinfo?(xyuan)
Right-to-left means aligned right. For example on typing in Hebrew it must affect RTL and LTR while typing in English. Tye easy standard solution for textarea <textarea dir=auto></textarea>, test case http://jsbin.com/IrugemE/1/edit
An updated test-case http://jsbin.com/IrugemE/2/edit
@Binyamin, thanks for your explanation and test cases. Then how do you expect us to fix this issue? Will adding|dir=auto| for all text areas be enough, or should we do extra work?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(7raivis)
Yes, adding "dir=auto" must fix the issue.
Also replace dir=ltr/rtl with dir=auto from any user customizable holder (<p>, <div>, <input>, <textarea>, etc.), like SMS messages, Contacts, etc. to affect LTR/RTL automatically. For example you can avoid "dir" from <input type=email/tel/number> since it always must affect default LTR (email can contain just Latin characters, numbers has left-to-right writing also in right-to-left).

W3C summarized test results:
4 failes test cases - http://www.w3.org/International/tests/html5/the-dir-attribute/results-dir-auto
4 failes test cases - http://www.w3.org/International/tests/html-css/bidi-html5/results-bidi-html5

This W3C test cases https://github.com/w3c/web-platform-tests/tree/master/html/dom/elements/global-attributes seems Firefox 24 stable passes fine.
Flags: needinfo?(7raivis)
Yes, adding "dir=auto" must fix the issue.
Also replace dir=ltr/rtl with dir=auto from any user customizable holder (<p>, <div>, <input>, <textarea>, etc.), like SMS messages, Contacts, etc. to affect LTR/RTL automatically. For example you can avoid "dir" from <input type=email/tel/number> since it always must affect default LTR (email can contain just Latin characters, numbers has left-to-right writing also in right-to-left).

W3C summarized test results:
4 failed test cases - http://www.w3.org/International/tests/html5/the-dir-attribute/results-dir-auto
4 failed test cases - http://www.w3.org/International/tests/html-css/bidi-html5/results-bidi-html5

This W3C test cases https://github.com/w3c/web-platform-tests/tree/master/html/dom/elements/global-attributes seems Firefox 24 stable passes fine.
Blocks: gaia-rtl
CC'ing Mohammad Dirar who wants to take this and actually helping him get his first bug done.
PS: I will file another bug for non editable elements.
Summary: RTL and mixed LTR & RTL support in keyboard textarea → Mixed LTR & RTL content support in text input fields and textarea
Attached file Pull Request to Bug 876825 (obsolete) —
I'm new here Can you please help me get this merged, review please?
Attachment #8413431 - Flags: review?(fabien)
Comment on attachment 8413431 [details] [review]
Pull Request to Bug 876825

Fabien is not in. Flagging Rudy to see if we can get this reviewed and landed. Would be really great to have for Arabic support.
Attachment #8413431 - Flags: review?(fabien) → review?(rlu)
This seems to be a general issue that is across multiple apps, so change the component.
Component: Gaia::Keyboard → Gaia
Comment on attachment 8413431 [details] [review]
Pull Request to Bug 876825

Tim, could you please help review this since I don't think I could review a Gaia-wide patch like this.
Thank you.
Attachment #8413431 - Flags: review?(rlu) → review?(timdream)
Comment on attachment 8413431 [details] [review]
Pull Request to Bug 876825

This need rebase. I can rubberstamp r+ once rebased.
Attachment #8413431 - Flags: review?(timdream) → feedback+
How is the rebase coming? Can we this go back up for review? now? Thanks!
ux-b2g: --- → 2.1
Assignee: nobody → md.otoum
What is the status here? Would like to get this into 2.0 if at all possible.
Taking after a little chat with Mohamad.
Will get a PR ready ASAP.
Assignee: md.otoum → nefzaoui.ahmed
Attached file Github pull-request
Attachment #8413431 - Attachment is obsolete: true
Attachment #8452879 - Flags: review?(timdream)
Attachment #8452879 - Flags: review?(timdream) → review+
Keywords: checkin-needed
Master: https://github.com/mozilla-b2g/gaia/commit/859c26a147d21f26859c17511d3cbb92f4e4a881
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S6 (18july)
Great news. Thanks, all!
Lets try to uplift this to 1.4 for Dolphin.
blocking-b2g: --- → 1.4?
Flagging Rudy and Bruce on the uplift request in comment #21, as I know it came up in email discussion.
Flags: needinfo?(rlu)
Flags: needinfo?(bhuang)
(In reply to Andreas Gal :gal from comment #21)
> Lets try to uplift this to 1.4 for Dolphin.

Ahmed, do you know the level of effort needed to rebase to 1.4?
Flags: needinfo?(bhuang) → needinfo?(nefzaoui.ahmed)
Ahmed,

Could you also help uplifting your patch to v1.4?
I would expect there will be conflicts, so this could be transformed into a branch-specific patch for v1.4.

Thank you.
Flags: needinfo?(rlu)
Sure, I'll get a 1.4-specific patch ready.
Flags: needinfo?(nefzaoui.ahmed)
blocking-b2g: 1.4? → 1.4+
Same work, for v1.4
Attachment #8460086 - Flags: review?(timdream)
Attachment #8460086 - Flags: review?(timdream) → review+
Mass Edit: adding the [rtl-meta]
Whiteboard: [rtl-meta]
QA Whiteboard: [rtl-impact]
Whiteboard: [rtl-meta]
Keywords: verifyme
Hi Binyamin,
Could you provide the detailed reproduce steps or video for me to verify this bug? Thanks!
Flags: needinfo?(7raivis)
There is nothing to verify. If applied "dir=auto" it has to have correct bidi direction.
There is another W3C spec bug for placeholder bidi https://www.w3.org/Bugs/Public/show_bug.cgi?id=17814, hopefully W3C will reconsider to fix it.
Flags: needinfo?(7raivis)
This issue is verified fixed on Flame 3.0 and Flame 2.2

The user can correctly type in both RTL and LTR languages in a the same text field and the text will appear properly

Environmental Variables:
Device: Flame 3.0 (319mb)(Kitkat)(Shallow Flash)
Build ID: 20150205010209
Gaia: 2b83a6d5d1185a438b5bbd287497ac2743b501db
Gecko: 34a66aaaca81
Version: 38.0a1 (3.0)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:38.0) Gecko/38.0 Firefox/38.0


Environmental Variables:
Device: Flame 2.2 (319mb)(Kitkat)(Shallow Flash)
Build ID: 20150205002503
Gaia: c2047a46e29696238e9b4c9caaba47736421449a
Gecko: adfba0a07e9b
Version: 37.0a2 (2.2)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
Status: RESOLVED → VERIFIED
QA Whiteboard: [rtl-impact] → [QAnalyst-Triage?][rtl-impact]
Flags: needinfo?(pbylenga)
Keywords: verifyme
QA Whiteboard: [QAnalyst-Triage?][rtl-impact] → [QAnalyst-Triage+][rtl-impact]
Flags: needinfo?(pbylenga)
Keywords: verifyme
See Also: → 1141221
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: