Home

Bidi text cursor navigation

%3CLINGO-SUB%20id%3D%22lingo-sub-747004%22%20slang%3D%22en-US%22%3EBidi%20text%20cursor%20navigation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-747004%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20have%20noticed%20(much%20to%20my%20pleasure)%20that%20Edge%20has%20departed%20from%20the%20(somewhat%20non-standard%20and%20confusing)%20behavior%20of%20current%20Chrome%20with%20regards%20to%20navigating%20bidi%20text%20with%20the%20cursor.%3C%2FP%3E%3CP%3EThe%20current%20behavior%20in%20Chrome%20is%20to%20follow%20the%20visual%20ordering%20of%20the%20text.%20Edge%20seems%20to%20have%20changed%20this%20to%20follow%20the%20logical%20ordering.%3C%2FP%3E%3CP%3EI%20was%20wondering%20if%20this%20is%20something%20that%20is%20coming%20in%20future%20versions%20of%20chrome%20or%20was%20this%20a%20design%20decision%20of%20the%20Edge%20team%3F%20Where%20can%20I%20find%20this%20change%20documented%3F%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-748541%22%20slang%3D%22en-US%22%3ERe%3A%20Bidi%20text%20cursor%20navigation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-748541%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F373973%22%20target%3D%22_blank%22%3E%40yzahn%3C%2FA%3E%2C%20I%20can%20take%20a%20look%20at%20this%2C%20but%20I%20am%20not%20exactly%20sure%20what%20you%20mean%20by%20bidi%20text.%26nbsp%3B%20Are%20you%20referencing%20right%20to%20left%20languages%2C%20or%20something%20different%3F%26nbsp%3B%20Can%20you%20please%20put%20an%20example%20in%20the%20thread%20and%20I%20will%20try%20to%20figure%20out%20where%20the%20change%20was%20made.%3C%2FP%3E%0A%3CP%3EThanks%20-%20Elliot%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-748575%22%20slang%3D%22en-US%22%3ERe%3A%20Bidi%20text%20cursor%20navigation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-748575%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239638%22%20target%3D%22_blank%22%3E%40Elliot%20Kirk%3C%2FA%3E%26nbsp%3Bthanks%20for%20your%20reply.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3EAre%20you%20referencing%20right%20to%20left%20languages%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3Ewell%2C%20yes%20and%20no...%3C%2FP%3E%3CP%3EI%20am%20referring%20to%20bidirectional%20text%20i.e.%20text%20which%20is%20partly%20RTL%20and%20in%20part%20LTR.%3C%2FP%3E%3CP%3EIf%2C%20for%20example%2C%20we%20have%20the%20following%20text%3A%3C%2FP%3E%3CPRE%3Eabc%20ZYXW%3C%2FPRE%3E%3CP%3EFirst%20word%20-%20abc%20-%20being%20LTR%2C%20and%20second%20word%20-%20WXYZ%20-%20being%20RTL%2C%20(I%20am%20following%20the%20convention%20in%20the%20Unicode%20spec%20of%20representing%20RTL%20text%20using%20uppercase).%20The%20logical%20order%20of%20the%20characters%20differs%20from%20the%20visual%20order.%20Logically%2C%20we%20have%3A%26nbsp%3B%3C%2FP%3E%3CPRE%3Eabc%20WXYZ%3C%2FPRE%3E%3CP%3Ehowever%20seeing%20as%20the%20second%20word%20is%20displayed%20in%20a%20right%20to%20left%20direction%20we%20have%20the%20visual%20order%20of%3A%26nbsp%3B%3C%2FP%3E%3CPRE%3Eabc%20ZYXW%3C%2FPRE%3E%3CP%3EWhen%20the%20cursor%20is%20situated%20in%20the%20RTL%20area%20-%20as%20so%3A%3C%2FP%3E%3CPRE%3Eabc%20ZY%7CXW%3C%2FPRE%3E%3CP%3Ethere%20are%202%20methods%20of%20translating%20a%20right%20key%20press.%20One%20can%20move%20the%20cursor%20visually%20to%20the%20right%20as%20so%3A%26nbsp%3B%3C%2FP%3E%3CPRE%3Eabc%20ZYX%7CW%3C%2FPRE%3E%3CP%3Ewhich%20will%20actually%20be%20moving%20it%20to%20the%26nbsp%3B%3CEM%3Eprevious%26nbsp%3B%3C%2FEM%3Echaracter%20instead%20of%20the%20next%20character%20(in%20the%20logical%20ordering).%20Alternatively%2C%20we%20can%20always%20move%20to%20the%20next%20character%20in%20the%20logical%20sequence%2C%20meaning%20that%20a%20right%20key%20press%20will%20in%20reality%20move%20the%20cursor%20to%20the%20left%2C%20resulting%20in%20this%3A%26nbsp%3B%3C%2FP%3E%3CPRE%3Eabc%20Z%7CYXW%3C%2FPRE%3E%3CP%3EThe%20consensus%20in%20most%20software%2C%20and%20this%20is%20Windows'%20behavior%2C%20is%20to%20follow%20the%20logical%20ordering%2C%20meaning%20a%20right%20key%20press%20will%20move%20the%20cursor%20to%20the%20left.%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20test%20this%20by%20using%20the%20following%20bidi%20string%3A%26nbsp%3B%3C%2FP%3E%3CPRE%3Eabc%20%D7%90%D7%91%D7%92%D7%93%3C%2FPRE%3E%3CP%3Epaste%20it%20into%20notepad%20and%20observe%20the%20behavior%20when%20browsing%20with%20the%20cursor.%3C%2FP%3E%3CP%3ECurrent%20versions%20of%20Chrome%20however%20use%20the%20visual%20ordering%20-%20meaning%20that%20a%20right%20key%20press%20will%20move%20the%20cursor%20to%20the%20right.%20This%20is%20a%20departure%20from%20the%20norm%20in%20most%20software%2C%20and%20personally%20I%20find%20it%20confusing.%3C%2FP%3E%3CP%3EThis%20can%20be%20tested%20by%20pasting%20the%20above%20string%20into%20a%20chrome%20input%20box%20and%20moving%20the%20cursor%20through%20the%20string.%3C%2FP%3E%3CP%3EI%20noticed%20(to%20my%20pleasure)%20that%20the%20new%20Edge%20follows%20the%20logical%20ordering.%20I%20am%20interested%20in%20knowing%20if%20this%20change%20was%20introduced%20by%20the%20chromium%20team%2C%20and%20will%20arrive%20in%20a%20future%20version%20of%20chrome.%20Or%20is%20this%20a%20design%20decision%20of%20the%20Edge%20team%20and%20if%20so%20where%20can%20I%20read%20more%20about%20this%3F%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E
yzahn
Occasional Contributor

Hi,

I have noticed (much to my pleasure) that Edge has departed from the (somewhat non-standard and confusing) behavior of current Chrome with regards to navigating bidi text with the cursor.

The current behavior in Chrome is to follow the visual ordering of the text. Edge seems to have changed this to follow the logical ordering.

I was wondering if this is something that is coming in future versions of chrome or was this a design decision of the Edge team? Where can I find this change documented?

Thanks.

2 Replies

Hi @yzahn, I can take a look at this, but I am not exactly sure what you mean by bidi text.  Are you referencing right to left languages, or something different?  Can you please put an example in the thread and I will try to figure out where the change was made.

Thanks - Elliot

@Elliot Kirk thanks for your reply.

 


Are you referencing right to left languages

well, yes and no...

I am referring to bidirectional text i.e. text which is partly RTL and in part LTR.

If, for example, we have the following text:

abc ZYXW

First word - abc - being LTR, and second word - WXYZ - being RTL, (I am following the convention in the Unicode spec of representing RTL text using uppercase). The logical order of the characters differs from the visual order. Logically, we have: 

abc WXYZ

however seeing as the second word is displayed in a right to left direction we have the visual order of: 

abc ZYXW

When the cursor is situated in the RTL area - as so:

abc ZY|XW

there are 2 methods of translating a right key press. One can move the cursor visually to the right as so: 

abc ZYX|W

which will actually be moving it to the previous character instead of the next character (in the logical ordering). Alternatively, we can always move to the next character in the logical sequence, meaning that a right key press will in reality move the cursor to the left, resulting in this: 

abc Z|YXW

The consensus in most software, and this is Windows' behavior, is to follow the logical ordering, meaning a right key press will move the cursor to the left. 

You can test this by using the following bidi string: 

abc אבגד

paste it into notepad and observe the behavior when browsing with the cursor.

Current versions of Chrome however use the visual ordering - meaning that a right key press will move the cursor to the right. This is a departure from the norm in most software, and personally I find it confusing.

This can be tested by pasting the above string into a chrome input box and moving the cursor through the string.

I noticed (to my pleasure) that the new Edge follows the logical ordering. I am interested in knowing if this change was introduced by the chromium team, and will arrive in a future version of chrome. Or is this a design decision of the Edge team and if so where can I read more about this?

Thanks.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies