|
Rank: Member Groups: Member
Joined: 6/11/2007 Posts: 15
|
Hi,
I have a dialog with several ASP TextBoxes and an ASP Button. The dialog is intended to be dismissed either by hitting the close gadget (a cancel), hitting escape (a cancel) or hitting the submit button (an accept).
If the dialog is clicked upon and then the ENTER key is hit, the dialog is dispatched. I do NOT want this since it is short circuiting the execution of the page. No submit behavior is performed.
How do I prevent the ENTER key from dispatching the dialog?
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I am not aware of the dialog doing any special handling on enter key. It supposes to do what it was doing without the dialog. Can you try it it with a blank page?
Thanks
|
|
Rank: Member Groups: Member
Joined: 6/11/2007 Posts: 15
|
Ah. There's an ASP Button elsewhere on the page that is getting focus by default. Then hitting ENTER on the dialog causes the postback for the button that was being covered up! I'm trying to figure out how to blur the focus of that button but haven't been able to kill it yet.
Is there a way to eat ENTER while IN a dialog?
|
|
Rank: Member Groups: Member
Joined: 6/11/2007 Posts: 15
|
Disabling USESUBMITBEHAVIOR on the ASP button causes it to behave nicely - and the dialog now behaves. Just learned something new.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Actually no. Not messing with any existing ENTER handling is the intended behavior for the dialog. So anything regarding ENTER key will need to be handled by yourself.
Thanks
|
|