# dialogs plugin issue regarding focus  and actions

**URL:** <https://forum.servoy.com/t/dialogs-plugin-issue-regarding-focus-and-actions/7281>\
**Category:** Classic Servoy\
**Created:** [March 30, 2007, 3:22pm UTC](https://forum.servoy.com/t/dialogs-plugin-issue-regarding-focus-and-actions/7281 "2007-03-30T15:22:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanthomasdevlin](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/seanthomasdevlin/32/5_2.png) [@seanthomasdevlin](https://forum.servoy.com/u/seanthomasdevlin)\
**Post date:** [March 30, 2007, 3:22pm UTC](https://forum.servoy.com/t/dialogs-plugin-issue-regarding-focus-and-actions/7281/1 "2007-03-30T15:22:56Z")

</div>

Servoy Developer  
Version 3.1.3-build 407  
Java version 1.5.0\_10-b03 (Windows XP)

Here’s the issue I’m seeing.  
I have a form where the on-Action handler for some elements submits some information (in this case a log in). The information is validated. If the validation fails, a dialog is shown explaining why (i.e. incorrect password).

If the user hits ‘eneter’ at the dialog to close it, it causes the action to be invoked again - seemingly, the element still has focus so it still can invoke actions. While I am creating a work-around, this seems like unexpected behavior.

This is reproducable:

1. Create a field
2. Attach an on action handler method
3. Use this method code

```auto
plugins.dialogs.showInfoDialog();

```

4)Hit ‘Enter’ to close thee dialog

Interestingly, this doesn’t happen when the trigger element is a button.

sean

---

<div class="post-metadata">

**Author:** ![MSibai](https://avatars.discourse-cdn.com/v4/letter/m/a4c791/32.png) [@MSibai](https://forum.servoy.com/u/MSibai)\
**Post date:** [March 31, 2007, 7:21am UTC](https://forum.servoy.com/t/dialogs-plugin-issue-regarding-focus-and-actions/7281/2 "2007-03-31T07:21:45Z")

</div>

Hi sdevlin,

Try to follow it by a “return;” command.

like :

```auto
if (something wrong){
   plugins.dialogs.showInfoDialog();
   return;
}

```
