RadConfirm in Toolbar

7 posts, 0 answers
  1. Luca B
    Luca B avatar
    36 posts
    Member since:
    Oct 2012

    Posted 07 Nov Link to this post

    Hi, I am using  this kb article to display a RadConfirm when the user clicks on a Delete button. I am currently using the latest build.

    Everything worked fine, but lately it doesn't postback anymore ONLY ON FireFox.

    I tried to replicate the issue in a small project, but it works as expected, so I guess there should be something I do in other places that breaks the behavior of the toolbar (?).

    Note that

    - if I remove the RadConfirm (or simply I do not cancel the ButtonClicking event) it works, so all my other code runs without interfering with the postback

    - if I try to force a postback by calling __doPostBack() (after clicking on the Delete button and answering the RadConfirm) it doesnt work too

    - I have a version of the application that runs with Telerik version 2015.2.623 without any problem (I am now going to try to go back to this version and see if it solves anything)

    I need a way I can debug this, as what happens after I click Yes on the RadConfirm is a mix of Telerik and MS code that is fairly complex.

    Thanks in advance

    Luca

  2. Luca B
    Luca B avatar
    36 posts
    Member since:
    Oct 2012

    Posted 07 Nov Link to this post

    A few notes more

    - I managed to use the newer components in the older application, and it works

    -if I open up any of the application pages and run a radconfirm/radalert from the javascript console, the page doesnt postback anymore

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 07 Nov Link to this post

    Hi Luca,

    I advise that you review the entire demo on using RadConfirm because it explains the core requirements: http://demos.telerik.com/aspnet-ajax/window/examples/confirmserverclicks/defaultcs.aspx. Another important bit is the invocation of the .click() method of the button for FireFox (see scripts.js for more details). This is a problem with Firefox.

    Firefox has a bug/limitation that when a form input element is removed from the form (RadConfirm contains buttons), then form.submit() method will not submit the form. Here is more info on this behavior - http://stackoverflow.com/questions/11582981/submit-fails-after-input-is-removed-from-form-in-firefox.

    No control of ours is causing this behavior and there is no reasonable way to prevent this from happening.

    The demo shows a simple workaround for a simple button, for more complex scenarios you may need to add a flag to avoid an endless loop.

     

     

    Regards,

     

    Marin Bratanov
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  5. Luca B
    Luca B avatar
    36 posts
    Member since:
    Oct 2012

    Posted 07 Nov Link to this post

    Hi Marin,

    thanks for your reply. The behavior is exactly the same you can see in your demo page: in FF, clicking the LinkButton and then on the Yes button does not postback.

    Now I understand why it works on the older version of the application: it uses RenderMode=Classic for radwindows, while the new one (and your demo site) use LightWeight.

    I am also able to replicate the issue in my test application, by switching the RadWindowManager to LightWeight

    So, basically you're telling me that I should avoid RadConfirm and RadAlert in FF???

    Thanks

  6. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 07 Nov Link to this post

    Hi Luca,

    This issue is documented in the following KB: http://www.telerik.com/support/kb/aspnet-ajax/window/details/form-will-not-submit-after-radconfirm-in-firefox. I cannot say that you should avoid them, but I cannot say what the best way to tackle this browser bug is in your concrete project.

    On my end, however, both demos work fine in FireFox with the additional code for Firefox that calls .click() for the DOM element of the button.


    Regards,

    Marin Bratanov
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  7. Luca B
    Luca B avatar
    36 posts
    Member since:
    Oct 2012

    Posted 07 Nov Link to this post

    Hi Marin,

    I managed to make it work by forcing the RenderMode of the RadWindowManager to Classic. That's not an optimal solution (I like the somewhat cleaner HTML of the LightWeight mode) but at least it works.

    Maybe the Classic RenderMode doesn't create/remove the buttons but it only shows/hides them?

    Regards

    Luca

  8. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 08 Nov Link to this post

    Hello Luca,

    The rendering is different, the Classic mode uses <a> tags to render the buttons, while the Lightweight mode uses <button> tags.

    Regards,

    Marin Bratanov
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017