# onFocusLost

**URL:** <https://forum.servoy.com/t/onfocuslost/15617>\
**Category:** Classic Servoy\
**Created:** [March 5, 2012, 5:33pm UTC](https://forum.servoy.com/t/onfocuslost/15617 "2012-03-05T17:33:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![info](https://avatars.discourse-cdn.com/v4/letter/i/c77e96/32.png) [@info](https://forum.servoy.com/u/info)\
**Post date:** [March 5, 2012, 5:33pm UTC](https://forum.servoy.com/t/onfocuslost/15617/1 "2012-03-05T17:33:14Z")

</div>

Hi

I’ve create a new window for load a modal form with this code:

```auto
        var Win = application.createWindow("Indirizzo", JSWindow.MODAL_DIALOG);
	Win.show(forms.indirizzi_dtl)

```

In this form i’ve some textbox, but when i lost focus from the textboxs this don’t invoke method onFocusLost.  
How can I intercepted this event in a modal form?

What does it mean the tool tips in this screenshot?

[attachment=0]onFocusLost.JPG[/attachment]

thks for help!

 ![onFocusLost.JPG](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/2X/e/e6eab193ebd17caba9b7f17013b204d48abe7697.jpeg)

---

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://forum.servoy.com/u/omar)\
**Post date:** [July 2, 2012, 2:59pm UTC](https://forum.servoy.com/t/onfocuslost/15617/2 "2012-07-02T14:59:01Z")

</div>

Hi,

I just tried this in Servoy 6.1RC5 and the onFocusLost was triggered in my case. The warning says that when you use a dialog box (such as showInfoDialog I guess) that this will interfere with the focus which is understandable because the focus goes from the elements in the form to the dialogbox and back (after it closes). Maybe somebody can elaborate on the specifics of this?
