This project is read-only.
26

Closed

Delete/Backspace keys do not work on MaskEditExtender + Safari

description

Hello,
Closed May 3, 2013 at 6:49 AM by Superexpert
Issue is closed as it is fixed with release April 2013.

comments

dulfe wrote Jun 25, 2008 at 4:35 PM

Sorry… I clicked in the wrong button … well the problem is:
If you add a “Textbox” with a “MaskEditExtender” with “mask” of 99/99/9999… they keys DELETE and BACKSPACE won’t work on Safari 3 for Windows…

But it work fine in IE, Firefox and Opera.

anprasad wrote Apr 27, 2009 at 6:41 PM

Has there been any progress on this issue? Can we get someone to look at this please?

ewolfman wrote Jun 22, 2009 at 9:55 AM

I've performed a minor patch in the AjaxControlToolkit (version 30512) in order to overcome this problem. Note, that this patch will work only if you implement the other patch for Chrome/Safari which is described here: http://preview.tinyurl.com/dmc8mh.

The patch is as follows:
  1. Open MaskedEditBehavior.js (I performed this on MaskedEditBehavior.debug.js and copy-pasted over MaskedEditBehavior.js).
  2. Search for the text: "if (scanCode == 8) // BackSpace" (it's somewhere around line: 759, in toolkit version 30512).
  3. Change the existing "if" statement prior to the previous line to this:
    if (Sys.Browser.agent == Sys.Browser.InternetExplorer ||
        Sys.Browser.agent == Sys.Browser.WebKit ||
        evt.type == "keypress") {
    
  4. Compile and test.
Explanation: The event raised from chrome and safari isn't "keypress" when clicking delete or backspace (or any other of those "special keys", such as home). So the statement which determines whether to handle this event, by either "keypress" or IE, isn't sufficient. The "WebKit" tested here is from the patch in the url above.

Disclaimer: Do this at your own risk. I've just implemented this and it seems to be working ok (Chrome 2 and Safari 4), but it's your call whether or not to use this patch.

fimjox wrote Apr 12, 2010 at 6:41 AM

Does it work with iPad?
I went to the link for the ASP code needed and go this error:
I had to change the tag name From ajax:ToolkitScriptManager to asp:ToolkitScriptManager OK?
I get this error after inserting the ASP tags and compiling:
'ASP.default_aspx' does not contain a definition for 'Page_OnAsyncError'
same thing for OnHistoryNavigate
When will it ever end?

berkej wrote Apr 29, 2010 at 5:48 PM

This is a preety big issue for us. We are getting an increasing number of webkit users on our sites. Any chance this patch could be incorporated in an upcoming version?

PeterZhao wrote Jul 2, 2010 at 9:53 AM

[Confirmed by Peter Zhao, a bug]
This issue can be repro on Safari and Chrome, not repro on IE, Firefox and Opera.
ACT build: 3.5.0.40412.

Please see the explanation from ewolfman.
And according to the explanation, I think the same issues may occur with other ACT controls on Safari and Chrome.
For his fix to this issue, I think it may affect too much, and we need to consider how to fix this one.

Thanks,
Peter

npackham wrote Jul 9, 2010 at 10:04 AM

We're might pull masked edit extenders from our projects because of this bug. Please escalate.

carlosveber wrote Dec 1, 2010 at 10:50 PM

two years?

PauloRuizSP wrote Dec 8, 2010 at 6:41 PM

Sys.Browser.WebKit don't work....
use Sys.Browser.Safari.

fujiy wrote Aug 11, 2011 at 12:37 PM

Any fix that dont need compile your own assembly?

oliviaheller wrote Aug 28, 2011 at 3:46 PM

I've downloaded the latest AjaxControlToolKit.dll (4.1.50731) from Aug. 18 2011.
The delete and backspace keys still don't work in MaskedEditExtender for Chrome and Safari, but they work in IE, FireFox and Opera.

It seems to be 2 solutions:
  1. Follow explanation from ewolfman (see bellow in this post) or from http://ajaxcontroltoolkit.codeplex.com/workitem/26978
    OR
  2. Use jQuery instead of MaskedEditExtender
The web project I'm working on has many MaskedEditExtender linked to CalendarExtender and validated by using MaskedEditValidator. So, the less time consuming would be a new AjaxControlToolKit dll containing the fix.

Maybe a difficult question: are there any plans from Microsoft side to release such a AjaxControlToolKit in the near future?

Thank you in advance.

plocek wrote Nov 27, 2012 at 11:54 PM

Fix this error please. I downloaded new version 4.1.60919 and still don't work in Chrome browser.

joshuay66 wrote Mar 5, 2013 at 2:55 PM

Please provide a fix for this issue. Thank you.