import navigatorUtil from 'internal/util/navigator';

/**
 * For a mouse click event, determine whether if it should be handled in the same tab or not.
 *
 * @param {MouseEvent} e a jquery mouse event
 * @returns {Boolean} true if a mouse click event should be handled in the same tab, false otherwise
 */
export default function openInSameTab(e) {
    return (!e.which || e.which === 1) &&
          !(e.metaKey || e.ctrlKey || e.shiftKey || (e.altKey && !navigatorUtil.isIE()));
}
