Button DirectEvents Click EventMask doesn't hide after event complete in IE9

  1. #1

    Button DirectEvents Click EventMask doesn't hide after event complete in IE9

    Hi Daniil,

    EventMask doesn't not automatically hides after the click event is completed. Problem encountered in IE10 and below. This is working fine in IE11 and other browsers (FF, Chrome).

    See test case below:

    View (Index.cshtml):
    @model System.Collections.IEnumerable
    @using Ext.Net
    @using Ext.Net.MVC
    
    @{
        ViewBag.Title = "Test Case";
        var X = @Html.X();
    }
    
    @section main
    {    
        @X.ResourceManager() 
    
        @(X.FormPanel()
        .Layout(LayoutType.Column)
        .FieldDefaults(fd =>
        {
            fd.LabelAlign = LabelAlign.Left;
            fd.LabelSeparator = "";
            fd.LabelWidth = 150;
        })
        .Items(
            X.FileUploadField()
            .ID("fupload")
            .FieldLabel("File to Upload")
            .IndicatorIcon(Icon.Attach)
            .Listeners(l => {
                l.AfterRender.Handler = "$('#fupload-button-btnWrap').hide();";
                l.IndicatorIconClick.Handler = "$('#fupload-button-fileInputEl').click();"; 
            })
                                    
            , X.Button()
            .ID("btnUpload")
            .Text("Upload Me")
            .DirectEvents(de =>
            {
                de.Click.Url = Url.Action("UploadMe");
                de.Click.ExtraParams.Add(new Parameter { Name = "id", Mode = ParameterMode.Value, Value = "1" });
                de.Click.EventMask.ShowMask = true;
            })
        )
        )
    }
    Controller (TestCaseController.cs):
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
    using Ext.Net;
    using Ext.Net.MVC;
    
    public class TestCaseController : Controller
    {
            public ActionResult Index()
            {
                return View();
            }
    
            public ActionResult UploadMe(int id)
            {
                try
                {
                    var fileUploadField = this.GetCmp<FileUploadField>("fupload");
                }
                catch (Exception ex)
                {
                }
    
                return this.Direct();
            }
    }
    Versions:
    Ext.NET 2.5.0
    Newtonsoft.Json 6.0.0.0
    .NET Framework 4.0

    Looking forward for your utmost response to resolve this browser issue.
    Last edited by recharge; Mar 11, 2014 at 6:50 AM.
  2. #2
    Hi @recharge,

    Please replace
    return this.Direct();
    with
    return new DirectResult() { IsUpload = true };
    See also
    http://forums.ext.net/showthread.php...ng-DirectEvent
  3. #3
    This works! Thanks.

Similar Threads

  1. How can i do Button EventMask Hide
    By fatihunal in forum 1.x Help
    Replies: 7
    Last Post: Jan 12, 2016, 4:22 PM
  2. [CLOSED] EventMask question on button click event
    By wangyi in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 27, 2013, 3:52 AM
  3. Replies: 0
    Last Post: Jun 12, 2012, 10:00 AM
  4. Replies: 2
    Last Post: Nov 02, 2011, 3:10 AM
  5. Replies: 4
    Last Post: Nov 19, 2010, 1:39 PM

Posting Permissions