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

radconfirm steals focus from calling page

1 Answer 46 Views
Window
This is a migrated thread and some comments may be shown as answers.
Teodorico
Top achievements
Rank 1
Teodorico asked on 10 Jul 2009, 10:04 PM

Hi,

I am calling a radconfirm from a web page. After the user clicks on "OK or "Cancel" the radconfirm closes, the callback function gets invoked, but the focus is not returned to the control that had it before opening the radconfirm window.

I could set it by calling .focus() but I have more than 25 textboxes and I do not want to keep track of the control with the current focus. Using the standard browser confirmation windows keeps the focus were it was before opened.

Is there any possible solution for this? It forces the user to grab the mouse and click back on the page.

 

Thanks.

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 13 Jul 2009, 10:51 AM
Hi Teodorico,

This behavior is the expected one in this case, because the radconfirm is rendered on the client as several HTML elements and they are a part of the whole HTML document. The buttons inside the confirm dialog are html elements as well and when you click on them the focus is changed - goes on the clicked element. The browser's windows(alert(), confirm(), open() etc.) are not HTML elements and they are not a part of the page. When you click on a browser's popup you do not click on the HTML document and the focus does not change.
In this case you need to manually set the focus on the clicked element and for your convenience I have attached an example to this thread.

I hope this helps.

Kind regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
Teodorico
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or