Hi buddies,
I hope you're doing well.
I'm facing a very weird issue.
Basically, every time that the user writes in the Input widget that information must be sent by event to the father block. I tried to use the OnChange event of the widget and works, but I can only write one character at a time because every time I write a character the mouse left the Input widget. This input widget is inside a List widget.
I believe this issue is related to Javascript, but I can't figure out how to solve it.
Can you help me, please?
Thank you.
Kind regards,
FC
Hi Aji,
Thanks for your suggestion and help, but I found a solution that fits better my situation.
I figured out using the onblur event of the widget.
Anyway thanks a lot for your help.
Have fun with OutSystems :)
Hi Fabio,
It looks like input onchange event triggering very fast thats why it might be happening. You can delay the trigger of onchange event.
Can you please try below solution.
https://www.outsystems.com/forums/discussion/9324/input-on-change-is-too-fast/
Thanks.
Hi @Fábio Miguel Ferreira Coelho ,
it is perfectly possible to trigger an event in the onchange and still stay inside the input. It must be something you do in the code in either the onchange or the handler of the trigger, maybe changing the input to the block, causing a refresh of the list or something like that.
Take it step by step, first just have the onchange without a trigger, then trigger but don't handle, than handle but make sure nothing happens in Onparameterschanged, etc.
My educated guess without seeing your code is that somewhere along the way, you are updating the change to the database, and refreshing the list, all dom elements of the list get removed and later created again and as a consequence of that refresh, focus is gone.
This is not related to it involving a webblock, any place that you refresh an aggregate or dataaction, will loose focus on any inputs inside a related list or table widget.
Dorine
Hi Dorine,