Open eriklharper opened 1 year ago
This article explains in detail why some of this behavior occurs in the browser: https://marijnhaverbeke.nl/blog/cursor-in-bidi-text.html
@annierm18 Could you confirm the expected behavior from the description is the desired approach? Genuinely curious because this is something I've noticed before in other UI libraries and thought it was by design due to the BiDi algorithm.
@annierm18 Could you confirm the expected behavior from the description is the desired approach? Genuinely curious because this is something I've noticed before in other UI libraries and thought it was by design due to the BiDi algorithm.
I got confirmation from Cecilia Sung in the Internationalization Services Teams Channel here:
@eriklharper Awesome, thanks for confirming. 🏆
Yes, thanks @eriklharper! Let us know if you need any more info :)
Actual Behavior
In RTL mode, it is difficult to edit portions of the date value with the keyboard in Input Date Picker's input field because the cursor jumps around unexpectedly when editing the value or moving the cursor with the arrow keys. The left arrow key in certain places will move to the right (and the right arrow key moves to the left), such as within moving the cursor between groups of numbers, but in other cases moves the cursor in the same direction as indicated by the key, such as when moving the cursor on either side of the
/
separator between the date values.The Backspace key also doesn't always work as expected. Sometimes hitting backspace will actually remove characters and sometimes it won't depending on the cursor position. Sometimes hitting the
Delete
key will remove a character when theBackspace
key doesn't.Originally posted about here:
The year can be edited from the keyboard - fixed The day input from the keyboard still does not take effect - not fixed
Originally posted by @Olga8614 in https://github.com/Esri/calcite-components/issues/4569#issuecomment-1572623619
Expected Behavior
Reproduction Sample
https://codepen.io/eriklharper/pen/wvYVvzE
Reproduction Steps
Reproduction Version
1.4.0
Relevant Info
This seems to happen consistently on all browsers, but there could be slight variations in behavior across some.
Regression?
No
Priority impact
p2 - want for current milestone
Impact
No response
Esri team
ArcGIS Online