mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Sortable: Skip triggering over event if it's alreay over the continer. Fixes #9041: the over event fires on every pixel movement
This commit is contained in:
parent
89473f6557
commit
07ce771a13
6
ui/jquery.ui.sortable.js
vendored
6
ui/jquery.ui.sortable.js
vendored
@ -842,8 +842,10 @@ $.widget("ui.sortable", $.ui.mouse, {
|
||||
|
||||
// move the item into the container if it's not there already
|
||||
if(this.containers.length === 1) {
|
||||
this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
|
||||
this.containers[innermostIndex].containerCache.over = 1;
|
||||
if (!this.containers[innermostIndex].containerCache.over) {
|
||||
this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
|
||||
this.containers[innermostIndex].containerCache.over = 1;
|
||||
}
|
||||
} else {
|
||||
|
||||
//When entering a new container, we will find the item with the least distance and append our item near it
|
||||
|
Loading…
Reference in New Issue
Block a user