diff options
author | John Chen <zhang.z.chen@intel.com> | 2013-02-16 22:35:58 +0800 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2013-03-08 16:52:35 -0500 |
commit | 07ce771a13504b851bb9f74c8ce8e960d207384a (patch) | |
tree | 5695c3ef9689b2cf0e88ef4ad5fefb7212aedca9 /ui | |
parent | 89473f6557662d905a63faa3ae3520bf3715a7e8 (diff) | |
download | jquery-ui-07ce771a13504b851bb9f74c8ce8e960d207384a.tar.gz jquery-ui-07ce771a13504b851bb9f74c8ce8e960d207384a.zip |
Sortable: Skip triggering over event if it's alreay over the continer. Fixes #9041: the over event fires on every pixel movement
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.sortable.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 22acff7d1..0f9b113a4 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -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 |