AjaxControlToolkit
AjaxControlToolkit copied to clipboard
MaskedEditExtender: initial cursor position is inconsistent among browsers
16.1 and 19.0
The installation method
- [ ] Installer
- [X] NuGet package
- [ ] A custom build from the source code
Minimal steps to reproduce the bug
Create a new .aspx page with a textbox and a masked edit extender with mask format 9999.
In firefox and edge, the cursor will start on the left-most side no matter where you click, allowing you to type out the numbers that should be in the box.
In chrome, the cursor starts on the right-most side, which means that users have to backspace four times before they can enter the numbers.
During testing, it appears that opening the popup debugger window (F12) then closing it will cause the cursor to end up in the correct position.
A site deployment method
- [X] VS development web-server,
- [] IIS
I confirm the difference in the initial cursor position.
Interestingly, when the text box is not empty or when ClearMaskOnLostFocus="false"
is specified, Chrome provides better usability.
Awesome, it's good to know that I can throw a 0 in there if need be. I'll look into either doing that or setting ClearMaskOnLostFocus to work as a hopefully temporary fix.
My experience with this, in Chrome using a date mask, has been the cursor is located where ever the click occurred...left, right, middle. It is kind of annoying. If the control is empty and simply displaying the mask, my expectation would be positioning the cursor to the far left (being English) when clicking anywhere in the box.