I have a client who requested when a kendo control can't validate, the focus is kept on the invalidate object.
This is something that to my knowledge isn't supported by default by the components.
So i've tried something like writing a validation rule like this (raw example, won't work)
var isValid = false;
//some code to do validation
var kendoComponent = $(input.id).data("kendoCombobox");
The problem i'm having is that before input.focus(), the next component shortly ahs focus, and by setting the focus to the invalidate compinent, the next components validation is triggered as well. The next component says it's invalid, and thus calls for the focus. Creating an endless loop between these 2 components each asking for focus.
To try and counter this, i've kept a dominantfield status. If the validation is triggerd for a none dominant component, that component should always say "i'm valid" thus not calling for focus. As far is i can determine following stacktraces and output logging, this code is working, though somewhere focus is still being called on the second component causing an infinite loop. while the custom code i wrote in my validation ruls never call .focus() on the second component. I can't figure out why the components would still keep trying to get focus. or why in the telerik js code, an infite loop would be created.
Any thoughts on why this infinte loop could be created, or any input as how else this functionality can be obtained?