     notification_list.show()
 
 notification_list_click = (e) ->
+    e.preventDefault()
     target = $(e.target)
-    if target.parents('.smc-file-use-notifications-search').length
+    if target.parents('.smc-file-use-notifications-search').length or target.hasClass('btn') or target.parents('button').length
         return
-    unbind_handlers()
-    notification_list.hide()
+    hide_notification_list()
     notification_list_is_hidden = true
-    return false
 
 unbind_handlers = () ->
     $(document).unbind('click', notification_list_click)

   - [x] truncate too many names

- [ ] (2:00?) optimize
   - [ ] only show the first say 50 notifications and have a button to show more
   - [ ] switch to immutable.js info and shouldComponentUpdate and optimize when doing search


LATER:

MARK_SEEN_TIME_S = 3
# Length to truncate project title and filename to.
TRUNCATE_LENGTH = 50
# Number of notifications to show if "Show All" isn't clicked
SHORTLIST_LENGTH = 7


# standard modules
