Please be so kind as to read my full post before responding.
Thank you for your consideration.
With a colleague of mine I recently stumbled upon a very strange behaviour with one simple Javacript form customization.
In a custom form for work orders (msyn_workorder), there's a custom field to store work duration in 8-hour units (kk_duration) (that's the unit our technical staff offers services in).
There is a small JavaScript customization in place to calculate minutes from that field and store it in the the out-of-the-box-field (msdyn_primaryincidentestimatedduration), which then also shows the duration in a more readable format, see screenshot.
Simple code:
This basically works with one small caveat:
My colleague likes to switch to the next form field using the /Tab/-Key.
When he uses that after filling in the kk_duration Field and triggering onChange, msdyn_primaryincidentestimatedduration seems to reset to the previous value.
He uses Chrome as his browser, I use Firefox and we can both reproduce this strange behaviour consistently.
When using the mouse to click away or using enter to confirm the input and stay in kk_duration, there's no problem.
It seems to only occur when using tab to navigate.
Example: fill first field, tab onChange triggers, tab value resets
Any ideas on what makes /Tab/ cause this reset?
Thanks,
Sa.