Skip to main content

Search and Top Navigation

#8617 closed feature (duplicate)

Opened October 02, 2012 09:53PM UTC

Closed October 02, 2012 10:16PM UTC

dragging on right click ( reopened ticket 6909 )

Reported by: timur.junussov@bee.kz Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.mouse Version: 1.8.24
Keywords: Cc:
Blocked by: Blocking:
Description

I reopened this ticket http://bugs.jqueryui.com/ticket/6909

Using the "which" option to target a specific mouse button. like in this example http://threedubmedia.com/code/event/drag/demo/which

$(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" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
		if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
			return true;
		}
Attachments (0)
Change History (2)

Changed October 02, 2012 09:57PM UTC by timur.junussov@bee.kz comment:1

I made some changes, and it started working!

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

options:{cancel:":input,option",distance:1,delay:0,which:1}

and in function _mouseDown changed to read this option

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

Changed October 02, 2012 10:16PM UTC by scottgonzalez comment:2

resolution: → duplicate
status: newclosed

Duplicate of #6909.