function hideHandler( e )  {
			var inContainer = moduleFilter.contains( e.target );

			if ( e.keyCode === 27 || !inContainer ) {
				if ( e.keyCode === 27 && inContainer ) {
					moduleSearch.focus();
				}
				dropDown.style.display = "none";
				removeEvent( document, "click", hideHandler );
				removeEvent( document, "keydown", hideHandler );
				moduleSearch.value = "";
				searchInput();
			}
		}
// Hide on Escape keydown or outside-container click
Hide on Escape keydown or outside-container click
Hide on Escape keydown or outside - container click
function hideHandler( e )  {
			var inContainer = moduleFilter.contains( e.target );
			if ( e.keyCode === 27 || !inContainer ) {
				if ( e.keyCode === 27 && inContainer ) {
					moduleSearch.focus();
				}
				dropDown.style.display = "none";
				removeEvent( document, "click", hideHandler );
				removeEvent( document, "keydown", hideHandler );
				moduleSearch.value = "";
				searchInput();
			}
		}
function hideHandler ( e ) { var inContainer = moduleFilter . contains ( e . target ) ; if ( e . keyCode === 27 || ! inContainer ) { if ( e . keyCode === 27 && inContainer ) { moduleSearch . focus ( ) ; } dropDown . style . display = "none" ; removeEvent ( document , "click" , hideHandler ) ; removeEvent ( document , "keydown" , hideHandler ) ; moduleSearch . value = "" ; searchInput ( ) ; } }
Hide on Escape keydown or outside-container click
Hide on Escape keydown or outside - container click