New issue
Advanced search Search tips
Starred by 20 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2012
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Unable to Backspace or Delete Characters In TextBox with Masked Edit Extender in ASP.NET

Reported by michael....@gmail.com, Oct 11 2008

Issue description

Product Version      : 0.2.149.30
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Safari 3: N/A
    Firefox 3: OK
         IE 7: OK

What steps will reproduce the problem?

While working on an internal application for my company; I have a text box 
control that is using the Masked Edit Extender from the Ajax Control 
Toolkit that forces a user to enter in a formatted phone number. While 
using chrome, I noticed that I could not use the delete key or the 
backspace key to clear out the digits after I typed them in. In IE7 and FF3 
I can hit backspace or delete to clear out digits and type something 
different.  Here is my code block:

<asp:TextBox ID="txtWorkPhone" runat="server" MaxLength="12" 
Width="81"></asp:TextBox>
<cc1:MaskedEditExtender ID="mskWorkPhone" runat="server" 
ClearMaskOnLostFocus="false" ClearTextOnInvalid="false" 
InputDirection="LeftToRight" Mask="999-999-9999" MaskType="Number" 
TargetControlID="txtWorkPhone" AutoComplete="false">
</cc1:MaskedEditExtender>

What is the expected result?

You are only suppose to be able to enter numbers, which is true for chrome, 
however if you type in the wrong number, if you hit backspace or delete you 
are not able to remove the character.

What happens instead?

No response from Chrome, it just fails to delete or remove the characters.


Please provide any additional information below. Attach a screenshot if 
possible.


 

Comment 1 by anal...@gmail.com, Mar 23 2009

Tested in FF and IE8, both work.
Heard reports that Opera exhibits the same problem.
I think Safari also exhibits this behavior. The root issue may be coming from Webkit,
then.
Labels: -Area-Misc Area-Compat-Web

Comment 4 by karen@chromium.org, Oct 28 2009

Labels: Mstone-X
Labels: -Pri-2 -Area-Compat-Web Pri-3 Area-Webkit NeedsReduction report-to-webkit
Status: Available
Confirmed, the backspace key does not work here:
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/MaskedEdit/MaskedEdit.aspx

Safari doesn't work either, and spoofing the user-agent doesn't help.  I imagine these 
controls were just never built to support Webkit-based browsers, but maybe there's 
something upstreamable here.

Comment 6 by Deleted ...@, Mar 16 2010

Just some additional info on a workaround (I encountered the issue myself today):
selecting the text u want to remove and rightclick -> delete does work, but of course 
this is not very user friendly.

Comment 7 by Deleted ...@, Apr 21 2010

This problem is serious and needs work, please update priority.
Very important.
Nothing?

Comment 10 by Deleted ...@, Jan 19 2011

I'm experiencing this problem also, which I've noticed in both Safari 4.05 and Chrome 8.05. Other functionality works, as in character filtering, but just won't backspace or delete like it does in FF and IE.
Same here...... probally will never get fixed. Maybe its time to turn to jQuery after all :(
Labels: -NeedsReduction bulkmove Action-ReductionNeeded
Product Version      : 0.2.149.30
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Safari 3: N/A
    Firefox 3: OK
         IE 7: OK

What steps will reproduce the problem?

While working on an internal application for my company; I have a text box 
control that is using the Masked Edit Extender from the Ajax Control 
Toolkit that forces a user to enter in a formatted phone number. While 
using chrome, I noticed that I could not use the delete key or the 
backspace key to clear out the digits after I typed them in. In IE7 and FF3 
I can hit backspace or delete to clear out digits and type something 
different.  Here is my code block:

&lt;asp:TextBox ID=&quot;txtWorkPhone&quot; runat=&quot;server&quot; MaxLength=&quot;12&quot; 
Width=&quot;81&quot;&gt;&lt;/asp:TextBox&gt;
&lt;cc1:MaskedEditExtender ID=&quot;mskWorkPhone&quot; runat=&quot;server&quot; 
ClearMaskOnLostFocus=&quot;false&quot; ClearTextOnInvalid=&quot;false&quot; 
InputDirection=&quot;LeftToRight&quot; Mask=&quot;999-999-9999&quot; MaskType=&quot;Number&quot; 
TargetControlID=&quot;txtWorkPhone&quot; AutoComplete=&quot;false&quot;&gt;
&lt;/cc1:MaskedEditExtender&gt;

What is the expected result?

You are only suppose to be able to enter numbers, which is true for chrome, 
however if you type in the wrong number, if you hit backspace or delete you 
are not able to remove the character.

What happens instead?

No response from Chrome, it just fails to delete or remove the characters.


Please provide any additional information below. Attach a screenshot if 
possible.

Comment 13 by Deleted ...@, Apr 25 2011

Also, when tabbing into a text box control that is using the maskededit extender and righttoleft input direction, the entire control is selected, and the cursor is not placed where it should be.

Comment 14 by Deleted ...@, Jun 7 2011

mmm i have the same problem with the latest version of safari and chrome ver 11.0.696.77 m, if this issue comes from de 2008 year, and 3 year later the problem was not fixed. My solution is validate the numer format manualy with programming code, or some java script. This Is not friendly, i need a solutio because we cant force user to use IE.

Comment 15 by djpep...@gmail.com, Jun 13 2011

I solved it.

This is a problem of Ajax Control Toolkit, chrome is working ok. If you see MaskEditBehavior.js file (available in AjaxControlToolkit source), and search for "if (scanCode == 8)" (at this point is simulated the character deletion), you will notice that this code is inside a if: "if (Sys.Browser.agent == Sys.Browser.InternetExplorer || evt.type == "keypress")". So this is not Internet Explorer, and "keypress" is fired only for keys which produce a character value (http://www.w3.org/TR/2010/WD-DOM-Level-3-Events-20100907/#events-keyboard-event-order)... so this is what I did:

First I did this: http://blog.turlov.com/2009/01/aspnet-ajax-compatibility-patch-for.html

And then, I replaced this line:
if (Sys.Browser.agent == Sys.Browser.InternetExplorer || evt.type == "keypress")

With this one:
if (Sys.Browser.agent == Sys.Browser.InternetExplorer || evt.type == "keypress" || Sys.Browser.agent == Sys.Browser.WebKit)

And now is working fine ;)

Comment 16 by Deleted ...@, Sep 9 2011

Hello,

Where is "MaskEditBehavior.js", is it on the server? Do I need to compile the AJAX.NET dll or something?

Is this something I need Visual Studio for... because I don't have it. 

Thanks,
Paul.

Comment 17 by Deleted ...@, Jan 28 2012

Reply to Comment 16, you have to download the source code on Microsoft website, and re-comipile the ajaxcontroltoolkit, then reload the new compiled .dll file in your project.

Comment 18 by Deleted ...@, Apr 23 2012

Still no solution for chrome, the demo even not working on Chrome: http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/MaskedEdit/MaskedEdit.aspx

A big disappointment, return to jquery..
Labels: WebKit-Forms

Comment 20 by Deleted ...@, Aug 21 2012

This solution worked for me without having to re-compile the ajaxtoolkit:
http://ajaxcontroltoolkit.codeplex.com/workitem/26978

Comment 21 by Deleted ...@, Oct 23 2012

really small but big issue

Comment 22 by tkent@chromium.org, Dec 14 2012

Labels: -Mstone-X -report-to-webkit -bulkmove -Action-ReductionNeeded WebKit-Editing
Status: WontFix
My conclusion is that this is a bug of MaskedEdit, and Microsoft is responsible to fix it. So please ask Microsoft to fix it.

As for this keyboard event behavior, WebKit behaves same as Internet Explorer intentionally to improve web site compatibility. If we changed WebKit so that MaskedEdit worked without any modification, WebKit would not work with many other web pages.

Project Member

Comment 23 by bugdroid1@chromium.org, Mar 11 2013

Labels: -Area-Webkit -WebKit-Editing -WebKit-Forms Cr-Content Cr-Content-Forms Cr-Content-Editing

Comment 24 by Deleted ...@, Mar 20 2013

Estou com o mesmo problema! Por favor atualizem!
Project Member

Comment 25 by bugdroid1@chromium.org, Apr 6 2013

Labels: -Cr-Content Cr-Blink
Project Member

Comment 26 by bugdroid1@chromium.org, Apr 6 2013

Labels: -Cr-Content-Editing Cr-Blink-Editing
Project Member

Comment 27 by bugdroid1@chromium.org, Apr 6 2013

Labels: -Cr-Content-Forms Cr-Blink-Forms

Sign in to add a comment