code: function( event ) {
  
                      var target = event.target
  
                      // Make sure the target isn’t the root holder so it can bubble up.
                      if ( target != P.$root.children()[ 0 ] ) {
  
                          event.stopPropagation()
  
                          // * For mousedown events, cancel the default action in order to
                          //   prevent cases where focus is shifted onto external elements
                          //   when using things like jQuery mobile or MagnificPopup (ref: #249 & #120).
                          //   Also, for Firefox, don’t prevent action on the `option` element.
                          if ( event.type == 'mousedown' && !$( target ).is( 'input, select, textarea, button, option' )) {
  
                              event.preventDefault()
  
                              // Re-focus onto the root so that users can click away
                              // from elements focused within the picker.
                              P.$root[0].focus()
                          }
                      }
                  }
docs: When something within the root holder is clicked, stop it from bubbling to the doc.