intercepting return key after find()

I am using Servoy 5.2.11.

I have forms that are nested 2 levels deep in tabpanels. On all of these forms I have a find button that puts the form in find mode. I also have an OK button that performs the controller.search() as well as some UI stuff. When I hit the OK button everything works fine. I want it so that when the user hits the return key on the keyboard, that too will call my search method. I have tried attaching that search method to the form’s onSearch event, but strangely that doesn’t always work. On some forms it calls my search method. On others, it just performs the search without calling my method. I’ve compared the forms and their search methods and I see nothing that explains this difference in behavior.

I do have “controller.search()” in my search method. I know that is a requirement in order for Servoy to call your method while in find mode. That doesn’t seem to be helping. Does anyone know how I can get Servoy to call my method when I hit return? Thanks.

This morning I solved my problem, with a little help from this thread:

https://www.servoy.com/forum/viewtopic.php?f=2&t=16501

That thread talks about the need to set the onSearch property to “none”. I had done that on the form, and on all container forms (i.e. forms that contained it via tabpanels), and it still wasn’t preventing the search from taking place when I hit the return key. But what I realized this morning is that onSearch has to be “none” for ALL FORMS THAT ARE DISPLAYED, incuding forms in any neighboring tabpanels on the same main form. I had a couple navigation-related forms sitting in tabpanels on main (top-level) form and their onSearch was still set to DEFAULT. Once I set their onSearch properties to “none”, the return key stopped triggering the search and now I’m a happy camper and so is my client.