Closed
Bug 330175
Opened 19 years ago
Closed 19 years ago
Bidi: Visual caret movement during (logical) selection is confusing
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: timwi, Assigned: uriber)
References
Details
Attachments
(1 file)
9.71 KB,
patch
|
smontagu
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Normally Shift+Right Arrow means "select the next character that comes logically (not visually) after the cursor" (assuming I'm selecting from left to right.
However, if you have primarily Latin text but with Arabic text embedded in it, Shift+Right Arrow always selects visually to the right, which in Latin text means selecting the next character, in Arabic text means de-selecting the previous character, and at the boundary means select the whole Arabic text en masse.
Two reasons I think this should be changed:
(1) All native Windows controls behave the "logical" way (right-arrow means "select next character" when in LTR mode, even if it means the selection actually goes visually to the left). Try it in Notepad.
(2) In order to select an LTR word followed by an Arabic word, I have to: (a) use Shift+Right to select the LTR word, plus one character. This selects everything except for the last character of the Arabic word; (b) press Shift+Left to extend the selection to include the last Arabic character. By contrast, in Windows native controls I just keep pressing Shift+Right until everything is selected.
Reproducible: Always
Steps to Reproduce:
Assignee | ||
Comment 1•19 years ago
|
||
I was tempted to resolve this as a duplicate of bug 167288, but the truth is that the combination of visual caret movement and logical selection is really confusing, even when normal caret movemet is visual. OS X (which uses visual caret movement) solves this by reverting to logical movement when the shift key is down.
So issue 1, above, is Windows-specific and a duplicate of bug 167288, but I'm confirming this bug for issue 2. I'm changing the summary to reflect this.
There are two ways to fix this, IMO: one is to fix bug 195909 (re-implement visual selection), and the other (perhaps more realistic) is to go the OS X way and use logical movement while selecting.
Assignee: nobody → mozilla
Status: UNCONFIRMED → NEW
Component: Keyboard Navigation → Layout: BiDi Hebrew & Arabic
Depends on: 167288
Ever confirmed: true
OS: Windows 2000 → All
Product: Firefox → Core
QA Contact: keyboard.navigation → zach
Hardware: PC → All
Summary: Selecting Arabic text inside Latin text does not follow standard → Bidi: Visual caret movement during (logical) selection is confusing
Version: unspecified → Trunk
Comment 2•19 years ago
|
||
(In reply to comment #0)
> (2) In order to select an LTR word followed by an Arabic word, I have to: (a)
> use Shift+Right to select the LTR word, plus one character. This selects
> everything except for the last character of the Arabic word; (b) press
> Shift+Left to extend the selection to include the last Arabic character. By
> contrast, in Windows native controls I just keep pressing Shift+Right until
> everything is selected.
"Shift+Right [or Shift+Control+Right] until everything selected" works in Mozilla also, except in the case where the last word in the text control has the opposite directionality from the base direction, e.g. "english ARABIC" in an ltr control, where the caret gets stuck to the left of the C. Is this bug filed? It can be worked around by pressing Shift+End.
Having said that, I think the OSX behaviour described in comment 1 has a lot to be said for it.
Assignee | ||
Comment 3•19 years ago
|
||
Updated•19 years ago
|
Attachment #216580 -
Flags: review?(smontagu) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #216580 -
Flags: superreview?(roc)
Comment on attachment 216580 [details] [diff] [review]
patch
+ PRInt32 mCaretMovementStyle;
PRUint8 please
Attachment #216580 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 5•19 years ago
|
||
Checked in, with the change requested in comment #4.
Checking in modules/libpref/src/init/all.js;
/cvsroot/mozilla/modules/libpref/src/init/all.js,v <-- all.js
new revision: 3.630; previous revision: 3.629
done
Checking in layout/base/nsIFrameSelection.h;
/cvsroot/mozilla/layout/base/nsIFrameSelection.h,v <-- nsIFrameSelection.h
new revision: 1.70; previous revision: 1.69
done
Checking in layout/generic/nsSelection.cpp;
/cvsroot/mozilla/layout/generic/nsSelection.cpp,v <-- nsSelection.cpp
new revision: 3.223; previous revision: 3.222
done
Checking in layout/generic/nsTextFrame.cpp;
/cvsroot/mozilla/layout/generic/nsTextFrame.cpp,v <-- nsTextFrame.cpp
new revision: 1.567; previous revision: 1.566
done
Checking in layout/generic/nsFrame.cpp;
/cvsroot/mozilla/layout/generic/nsFrame.cpp,v <-- nsFrame.cpp
new revision: 3.638; previous revision: 3.637
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in
before you can comment on or make changes to this bug.
Description
•