Powered by Vanilla 1.1.8.
I get the following error: '0.className' is null or not an object
on this line: if(parent[0] && (parent[0].className.indexOf(settings.holder_class) >= 0)) {
when clicking a submit button. Any ideas?
Here is the code below:
return this.each(function() {
var form = jQuery(this);
// Focus specific control holder
var focusControlHolder = function(element) {
var parent = element.parent();
while(typeof(parent) == 'object') {
if(parent) {
if(parent[0] && (parent[0].className.indexOf(settings.holder_class) >= 0)) {
parent.addClass(settings.focused_class);
return;
} // if
} // if
parent = jQuery(parent.parent());
} // while
};
It seems to be an issue with parent reaching the document object. I put in the following line of code and it seems like a good band-aid fix.
if(parent) {
if (parent[0] === document) return;
if(parent[0] && (parent[0].className.indexOf(settings.holder_class) >= 0)) {
1 to 2 of 2