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

[Solved] Window as Modal doesn't disable events on parent window

2 Answers 19 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Darren Furr
Top achievements
Rank 1
Darren Furr asked on 10 Feb 2012, 04:26 PM
I'm launching the Telerik Window with .modal(true).  However, when doing this - I can still use the Tab key to move from control to control on the parent window.

Is this a bug or do you have a recommendation for disabling the keyboard events on the parent window?

Thanks for the help,
-Darren

2 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 13 Feb 2012, 11:54 AM
Hi Darren,

This behavior is expected - you can't completely block the browser's page (like it is done when for example window.alert() is called) as this is something that cannot be done with JavaScript. What I could suggest in your case is to use Window's OnOpen and OnClose events and manually intercept the keys that you don't want to be active while a Window is shown. This StackOverflow article shows one way to prevent the Tab key with jQuery.

Kind regards,
Georgi Tunev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Darren Furr
Top achievements
Rank 1
answered on 13 Feb 2012, 04:30 PM
Yep - that's what I thought.  Exactly what I needed.  Just disabled tab & space.

Thanks Georgi.
Tags
Window
Asked by
Darren Furr
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Darren Furr
Top achievements
Rank 1
Share this question
or