mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
mouse: events and default actions on click are not fired after a drag action has been initiated
This commit is contained in:
parent
77d2c66690
commit
9be9c9f699
@ -628,6 +628,12 @@ test("{ helper: 'clone' }, absolute with scroll offset on root and parent", func
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
module("draggable: behaviour");
|
||||||
|
|
||||||
|
test("Events should not be executed on the element if drag is initiated", function() {
|
||||||
|
//TODO: Implement missing test
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
module("draggable: Tickets");
|
module("draggable: Tickets");
|
||||||
|
|
||||||
|
@ -345,8 +345,15 @@ $.ui.mouse = {
|
|||||||
_mouseInit: function() {
|
_mouseInit: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.element.bind('mousedown.'+this.widgetName, function(e) {
|
this.element
|
||||||
|
.bind('mousedown.'+this.widgetName, function(e) {
|
||||||
return self._mouseDown(e);
|
return self._mouseDown(e);
|
||||||
|
})
|
||||||
|
.bind('click.'+this.widgetName, function(e) {
|
||||||
|
if(self._preventClickEvent) {
|
||||||
|
self._preventClickEvent = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Prevent text selection in IE
|
// Prevent text selection in IE
|
||||||
@ -437,6 +444,7 @@ $.ui.mouse = {
|
|||||||
|
|
||||||
if (this._mouseStarted) {
|
if (this._mouseStarted) {
|
||||||
this._mouseStarted = false;
|
this._mouseStarted = false;
|
||||||
|
this._preventClickEvent = true;
|
||||||
this._mouseStop(e);
|
this._mouseStop(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user