Opened 11 years ago

Closed 11 years ago

#8617 closed feature (duplicate)

dragging on right click ( reopened ticket 6909 )

Reported by: [email protected] Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.mouse Version: 1.8.24
Keywords: Cc:
Blocked by: Blocking:


I reopened this ticket

Using the "which" option to target a specific mouse button. like in this example

$(myDIv).draggable({distance: 5, zIndex: 2700,which:3});

it is related to this jquery.ui.mouse.js

_mouseDown: function(event) {
		// don't let more than one widget handle mouseStart
		// TODO: figure out why we have to use originalEvent
		event.originalEvent = event.originalEvent || {};
		if (event.originalEvent.mouseHandled) { return; }

		// we may have missed mouseup (out of window)
		(this._mouseStarted && this._mouseUp(event));

		this._mouseDownEvent = event;

		var self = this,
			btnIsLeft = (event.which == 1), '''<--- Add support to specify this'''
			elIsCancel = (typeof this.options.cancel == "string" ? $( : false);
		if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
			return true;

Change History (2)

comment:1 Changed 11 years ago by [email protected]

I made some changes, and it started working!

in widget "ui.mouse"in deafult options i added option "which:1"


and in function _mouseDown changed to read this option

btnIsLeft = (event.which == this.options.which) // instead of this (event.which == 1)

comment:2 Changed 11 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #6909.

Note: See TracTickets for help on using tickets.