Right click handler
977427
def right_click(self, data, event_button, event_time):
        
        self.menu(event_button, event_time, data)
1271322
function handleKeyEvent() {
        if (!$dropdown) {
            if (!SidebarView.isVisible()) {
                SidebarView.show();
            }

            $("#project-dropdown-toggle").trigger("click");

            $dropdown.focus();
            $links = $dropdown.find("a");
            // By default, select the most recent project (which is at the top of the list underneath Open Folder),
            // but if there are none, select Open Folder instead.
            $dropdownItem = $links.eq($links.length > 1 ? 1 : 0);
            $dropdownItem.addClass("selected");

            // If focusing the dropdown caused a modal bar to close, we need to refocus the dropdown
            window.setTimeout(function () {
                $dropdown.focus();
            }, 0);
        }
    }
334003
def _left_click(self, event):
        """"""
        self.update_active()
        iid = self.current_iid
        if iid is None:
            return
        args = (iid, event.x_root, event.y_root)
        self.call_callbacks(iid, "left_callback", args)
1083901
def mousePressEvent(self, event):
        """"""
        # Raise the main application window on click
        self.parent.raise_()
        self.raise_()

        if event.button() == Qt.RightButton:
            pass
1301133
function handleMouseOver (e, d) {
            dispatcher.call('customMouseOver', e, d, d3Selection.mouse(e));
        }
749914
def js_on_click(self, handler):
        '''  '''
        self.js_on_event(ButtonClick, handler)
        self.js_on_event(MenuItemClick, handler)
136061
def accel_move_tab_right(self, *args):
        # TODO KEYBINDINGS ONLY
        
        pos = self.get_notebook().get_current_page()
        if pos != self.get_notebook().get_n_pages() - 1:
            self.move_tab(pos, pos + 1)
        return True
199650
def right_click(self, x, y, n=1, pre_dl=None, post_dl=None):
        
        self.delay(pre_dl)
        self.m.click(x, y, 2, n)
        self.delay(post_dl)
267252
function (event) {
                if (!this._enabled) {
                    return;
                }
                event = new ariaDomEvent(event);
                if (ariaCoreBrowser.isSafari) {
                    event.ctrlKey = this._safariCtrlKey;
                }
                // ctrl right click only
                if (event.ctrlKey) {
                    // stop default behaviour, like opening real
                    // contextual menu
                    event.stopPropagation();
                    event.preventDefault();
                    var target = event.target;
                    this.__callContextualMenu(target, event.clientX, event.clientY);
                    event.$dispose();
                    return false;
                }
                event.$dispose();
            }
1168257
def mouse_press_event(self, event):
        
        # Support left and right mouse button for now
        if event.button() not in [1, 2]:
            return

        self.example.mouse_press_event(event.x(), event.y(), event.button())
901228
def _on_click(self, event):
        """"""
        x = event.x
        self.coords('cursor', x, 0, x, self.winfo_height())
        self._variable.set(round2((360. * x) / self.winfo_width()))
60883
function clickOutside(elements, fn) {
  const self = {
    on,
    off,
    isClicked
  };

  let clickedEl;
  let handlers;

  function stop(e) {
    clickedEl = this;
    e.stopPropagation();
  }

  function pass() {
    clickedEl = undefined;
    fn();
  }

  function isClicked(el) {
    return el === clickedEl;
  }

  function on() {
    const html = document.documentElement;
    handlers = elements.map(function(el) {
      const handler = stop.bind(el);
      el.addEventListener('mousedown', handler);
      return handler;
    });
    html.addEventListener('mousedown', pass);
    return self;
  }

  function off() {
    const html = document.documentElement;
    html.removeEventListener('mousedown', pass);
    elements.forEach(function(el, i) {
      el.removeEventListener('mousedown', handlers[i]);
    });
    return self;
  }

  return self;
}
1291906
function eventStart ( event, data ) {

            if ( data.handleNumbers.length === 1 ) {

                var handle = scope_Handles[data.handleNumbers[0]];

                // Ignore 'disabled' handles
                if ( handle.hasAttribute('disabled') ) {
                    return false;
                }

                // Mark the handle as 'active' so it can be styled.
                scope_ActiveHandle = handle.children[0];
                addClass(scope_ActiveHandle, options.cssClasses.active);
            }

            // Fix #551, where a handle gets selected instead of dragged.
            event.preventDefault();

            // A drag should never propagate up to the 'tap' event.
            event.stopPropagation();

            // Attach the move and end events.
            var moveEvent = attachEvent(actions.move, document.documentElement, eventMove, {
                startCalcPoint: event.calcPoint,
                baseSize: baseSize(),
                pageOffset: event.pageOffset,
                handleNumbers: data.handleNumbers,
                buttonsProperty: event.buttons,
                locations: scope_Locations.slice()
            });

            var endEvent = attachEvent(actions.end, document.documentElement, eventEnd, {
                handleNumbers: data.handleNumbers
            });

            var outEvent = attachEvent("mouseout", document.documentElement, documentLeave, {
                handleNumbers: data.handleNumbers
            });

            document.documentElement.noUiListeners = moveEvent.concat(endEvent, outEvent);

            // Text selection isn't an issue on touch devices,
            // so adding cursor styles can be skipped.
            if ( event.cursor ) {

                // Prevent the 'I' cursor and extend the range-drag cursor.
                document.body.style.cursor = getComputedStyle(event.target).cursor;

                // Mark the target with a dragging state.
                if ( scope_Handles.length > 1 ) {
                    addClass(scope_Target, options.cssClasses.drag);
                }

                var f = function(){
                    return false;
                };

                document.body.noUiListener = f;

                // Prevent text selection when dragging the handles.
                document.body.addEventListener('selectstart', f, false);
            }

            data.handleNumbers.forEach(function(handleNumber){
                fireEvent('start', handleNumber);
            });
        }
407678
def _handle_double_click(self, event):
        
        if event.get_button()[1] == 1:  # Left mouse button
            path_info = self.tree_view.get_path_at_pos(int(event.x), int(event.y))
            if path_info:  # Valid entry was clicked on
                path = path_info[0]
                iter = self.list_store.get_iter(path)
                model = self.list_store.get_value(iter, self.MODEL_STORAGE_ID)
                selection = self.model.get_state_machine_m().selection
                selection.focus = model
1110845
function(ev) {
            // ignore right clicks
            if (ev.which !== Garnish.PRIMARY_CLICK) {
                return;
            }

            // Enforce the filter
            if (this.settings.filter && !$(ev.target).is(this.settings.filter)) {
                return;
            }

            this.mousedownTarget = ev.currentTarget;

            var $item = $($.data(ev.currentTarget, 'select-item'));

            if (this.first !== null && ev.shiftKey) {
                // Shift key is consistent for both selection modes
                this.selectRange($item, true);
            }
            else if (this._actAsCheckbox(ev)) {
                this.toggleItem($item, true);
            }
        }
144859
function onTriggerClick(e, noFocus) {
    toggleSubmenu(elements.trigger, (_, done) => {
      Classlist(elements.trigger).toggle(ACTIVE_CLASS);
      const wasActive = Classlist(elements.menu).contains(ACTIVE_CLASS);
      const first = wasActive ? ACTIVE_CLASS : 'dqpl-show';
      const second = first === ACTIVE_CLASS ? 'dqpl-show' : ACTIVE_CLASS;

      Classlist(elements.menu).toggle(first);

      if (elements.scrim) {
        Classlist(elements.scrim).toggle('dqpl-scrim-show');
      }

      setTimeout(() => {
        Classlist(elements.menu).toggle(second);
        if (elements.scrim) { Classlist(elements.scrim).toggle('dqpl-scrim-fade-in'); }
        setTimeout(() => done(noFocus));
      }, 100);
    });
  }
1137519
function (event){

    /*
    // @TODO Context menu?
    if(event.isRightClick()) {
      event.stop();

      var overlay = this.overlay;
      overlay.hide();

      function cancelContextMenu () {
        overlay.show();
        E.stopObserving(document, 'mousemove', cancelContextMenu);
      }
      E.observe(document, 'mousemove', cancelContextMenu);
      return;
    }
    */

    if (this.mouseUpHandler) return;
    this.mouseUpHandler = _.bind(function (e) {
      E.stopObserving(document, 'mouseup', this.mouseUpHandler);
      E.stopObserving(document, 'mousemove', this.mouseDownMoveHandler);
      this.mouseDownMoveHandler = null;
      this.mouseUpHandler = null;
      // @TODO why?
      //e.stop();
      E.fire(this.el, 'flotr:mouseup', [e, this]);
    }, this);
    this.mouseDownMoveHandler = _.bind(function (e) {
        var pos = this.getEventPosition(e);
        E.fire(this.el, 'flotr:mousemove', [event, pos, this]);
        this.lastMousePos = pos;
    }, this);
    E.observe(document, 'mouseup', this.mouseUpHandler);
    E.observe(document, 'mousemove', this.mouseDownMoveHandler);
    E.fire(this.el, 'flotr:mousedown', [event, this]);
    this.ignoreClick = false;
  }