[Webkit-unassigned] [Bug 27889] [Chromium] RTL autocomplete popup is not layout correctly.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 5 12:43:48 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=27889
--- Comment #8 from Xiaomei Ji <xji at chromium.org> 2009-08-05 12:43:46 PDT ---
Hi Aharon,
Thanks for your reply.
Please see my comments inline.
(In reply to comment #7)
> To prevent confusion on the directionality issue, I would suggest using simpler
> test strings: "hi!" and "אא!". The directionality is LTR if the exclamation
> mark comes out on the right, and RTL if it comes out on the left.
>
> > 1. In windows, Safari, FireFox, and IE all behave the same. They all display
> > the items in the popup list in left-to-right direction, no matter whether the
> > input field is an LTR or RTL field.
>
> That is not the result that I get:
>
> Firefox 3.0.11: always in browser language directionality (i.e. LTR)
> Safari 4.0.2: always in element directionality (i.e. RTL for the test page)
> Opera 9.64: did not auto-complete
> IE 7: did not auto-complete
I attached the display of "שש!" in Safari 4.0.2 in Windows.
It is displayed as RTL (the element directionality) in input field, but it is
displayed as LTR in the pop-up list.
Looks IE8 supports auto-complete, but it displays "hi!" and "שש!" in the pop-up
list as LTR using the test page.
>
> Thus, Firefox, Safari, and Chrome on Windows all do different things.
>
> It is important to point out that displaying a value in the right
> directionality is not a nice-to-have. In the wrong directionality, the value
> often comes out simply garbled. For example, displaying "17 Main St." as ".Main
> St 17", which is what comes out when it is displayed RTL, is simply wrong.
>
> BTW, the current Chrome bug that the drop-down is always left-aligned, even for
> a dir=rtl align=right element, is also a bug. No one else does that. Chrome has
> the same bug for <select> elements.
There are Chrome bugs on the wrong alignment for both autofill and <select>,
and I will fix them in another patch.
>
> In my opinion, it is Chrome's current behavior re directionality here that is
> the most useful. In most cases, a text input needs to be capable of accepting
> and displaying correctly - both LTR and RTL values.
> Thus, our BiDi support
> recommendations for web pages is to add directionality auto-detection scripts
> to most inputs that after each keystroke check the directionality of the
> current input value and adjust its dir and align values accordingly. Thus, both
> LTR and RTL values could have been submitted in the past, and all need to be
> displayed correctly, so checking the directionality of each value in the
> dropdown as Chrome does is the best.
Do you mean even if the text input field is marked as RTL,
it should display "hi!" in such input field as LTR?
and/or it should displayed "hi!" as LTR in the pop-up list?
If that is the case, what is the point of setting "dir" in the input field?
Or you mean "dir" should not be needed for autofill and <select>, a webpage
should be using auto-detect script to detect/display its text directionality
automatically?
If the auto-detect only applies to display text in pop-up list, that will cause
in-consistency of the text displayed in input (or <select> box) and text
displayed in the the pop-up list.
For example, the following <select>page:
https://bugs.webkit.org/attachment.cgi?id=14607&action=view
If you select the 2nd item, you can see the text displayed in the option box
(with "English" at very right) and text displayed in the pop-up list ("English"
displayed at the very left) are laid-out different.
The text in option box is displayed as LTR (because the dir of <select> is
LTR), and the same text in the pop-up list is displayed as RTL (because
directionality is auto-detected using the first strong directional character's
directionality).
In such case, what should be the correct behavior?
(In fact, Safari 4.0.2 display the text in RTL directionality in both option
box and pop-up list, although I do not know how Safari does it? And why it can
do such in <select> but not in autofill).
Thanks,
Xiaomei
> Failing that, Safari's approach of using
> the element's current directionality for all the items in the dropdown is still
> pretty much ok, since the likelihood that any given user will have entered both
> LTR and RTL values for a single field is not very high. In fact, it is in fact
> probably the better approach when the page does not have the directionality
> auto-detection scripts I mentioned earlier.
> But Firefox's approach of always
> using the browser language's directionality is totally nonsensical: RTL pages
> taking consistently RTL inputs will always have the dropdown values garbled.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list