It checks if the target clicked node is a form, if so, it is prevents closing.
If it doesn't find the form straight away (it may be nested), it will go through 4 parent nodes to check if any of those nodes are a form element, if so, it will prevent the dropdown from closing.
When using the BSDropdown component, the dropdown does not automatically close when clicking inside a form element.
When a click event is made, the below method is invoked.
The method does the following: