Open Bug 537506 Opened 15 years ago Updated 3 years ago

Can't switch off bidi in form input

Categories

(Core :: DOM: Selection, defect, P5)

x86
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: seahen123, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 GTB6
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 GTB6

At the above URL, there seems to be no way to select a visually contiguous block that includes part of a Hebrew word, or to make Shift-Left and Shift-Right work the same within the Hebrew as within the English.

Reproducible: Always

Steps to Reproduce:
1. Set bidi.support=3 or bidi.texttype=2 in about:config.
2. Restart to ensure that change has taken effect. 
3. Visit the above URL.
4. Click within the Hebrew text.
5. Drag to the left or right or press Shift-Left or Shift-Right.
Actual Results:  
When pressing Shift-Left or Shift-Right, the selection expands in the opposite direction to that pressed until the Hebrew ends, at which point it expands in the normal direction and creates a gap in the selection.

Expected Results:  
With the above about:config settings, Shift-Left always moves the non-cursor end of the selection to the visual left, whether that expands or contracts the selection, and Shift-Right always moves it to the right. The selection is always a visually contiguous block.

If there *is* a setting that fixes this, it just needs to be better documented.
Component: General → Selection
Product: Firefox → Core
QA Contact: general → selection
Update: It occurs to me that visual contiguity may be a bit more difficult to achieve if the right-to-left text is long enough to span lines, because then one needs to know which text is on which line before flipping the sequence. Maybe only rtl runs short enough to fit on one line should be handled in a visual sequence. Once the bidi engine had returned from processing a text node in HTML, that node would check for short runs, flip them with nsBidi::WriteReverse(), and wrap each one in a <bdo dir="ltr" style="@media screen {white-space:nowrap;}">. This would be undone before copying to the clipboard or exporting to plain text.

Still, something needs to be done about Shift-Right and Shift-Left.

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.