This is a migrated thread and some comments may be shown as answers.

RadConfirm in Toolbar

6 Answers 63 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Luca B
Top achievements
Rank 1
Luca B asked on 07 Nov 2016, 10:44 AM

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

6 Answers, 1 is accepted

Sort by
0
Luca B
Top achievements
Rank 1
answered on 07 Nov 2016, 11:55 AM

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

0
Marin Bratanov
Telerik team
answered on 07 Nov 2016, 12:22 PM

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.
0
Luca B
Top achievements
Rank 1
answered on 07 Nov 2016, 02:24 PM

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

0
Marin Bratanov
Telerik team
answered on 07 Nov 2016, 02:35 PM

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.
0
Luca B
Top achievements
Rank 1
answered on 07 Nov 2016, 04:16 PM

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

0
Marin Bratanov
Telerik team
answered on 08 Nov 2016, 09:03 AM

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.
Tags
ToolBar
Asked by
Luca B
Top achievements
Rank 1
Answers by
Luca B
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or