Added the ability to prevent dropdown closing