I've been looking for the whole day to a very small problem without been able to solve it

I have a very basic stack with a substack. On the substack there is a dataGrid.
My problem is that when I change record on the dataGrid, most of the times (not always) the focus goes to the main stack. This happens only using key Up/Down from keyboard, it doesn't happen if I change selection using my mouse.
Moreover, it just happens on the with the built app, while it doesn't on LiveCode development environment.
Any idea what it could be?
There is a script on the dataGrid, but the issue doesn't seem to be there, because I've even tried to put another dataGrid (without any code) on the same substack: exactly the same issue. Most of the time, if not always, focus goes to the main stack.
Is there any hope for me?
