Home › Forums › JavaScript › On body click, hide search › Re: On body click, hide search
April 21, 2013 at 7:21 am
#132574
CrocoDillon
Participant
You can keep that for now, I would add focus on the input element though so users can start typing right away.
The problem with `stopPropagation` is that when you have other code somewhere on the page that relies on `$(document).click(…);`, it breaks when the user clicks on `.find` or `.search`.