We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0be13b5 commit b100ed8Copy full SHA for b100ed8
ui/widgets/mouse.js
@@ -90,9 +90,11 @@ return $.widget( "ui.mouse", {
90
91
var that = this,
92
btnIsLeft = event.which === 1,
93
- elIsCancel = typeof this.options.cancel === "string" ?
94
- $( event.target ).closest( this.options.cancel ).length :
95
- false;
+ elIsCancel = typeof this.options.cancel === "function" ?
+ this.options.cancel.call(event.target, event) :
+ ( typeof this.options.cancel === "string" ?
96
+ $( event.target ).closest( this.options.cancel ).length :
97
+ false);
98
if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
99
return true;
100
}
0 commit comments