headerFooterBar.js onTap function, why is the depth 3?

In function onTap of directive headerFooterBar.js :
https://github.com/driftyco/ionic/blob/master/js/angular/directive/headerFooterBar.js#L94

Why is the depth set to 3. Why do we want to check only 3 level for a element that is not to be scrolled. Could it not be more, and this should be in the documentation as well.

Please help me understand the logic.

Thanks

So say for instance, you have a search bar in your header, you wouldn’t want to scroll top when you tap it.

Thanks for getting back. My question is how the number 3 was chosen. We are moving from the clicked DOM element to outsite checking if its parent is one of button, input, textarea, select, i or not ? right ?

Then why do we chose to go and check for 3 parents only ?