From e65ce1428460d53a74ee5f9e469d3bab40520175 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 26 May 2008 12:02:02 +0000 Subject: [PATCH] sortable: implemented tolerance: "guess", which is also the default tolerance mode now, resolves issues with using tolerance "pointer" (closes #2837) --- ui/source/ui.sortable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/source/ui.sortable.js b/ui/source/ui.sortable.js index 24339476d..e923fbe49 100644 --- a/ui/source/ui.sortable.js +++ b/ui/source/ui.sortable.js @@ -118,7 +118,7 @@ var l = item.left, r = l + item.width, t = item.top, b = t + item.height; - if(this.options.tolerance == "pointer") { + if(this.options.tolerance == "pointer" || (this.options.tolerance == "guess" && this.currentItem[0].offsetHeight > item.item[0].offsetHeight)) { if(!(y1 + this.offset.click.top > t && y1 + this.offset.click.top < b && x1 + this.offset.click.left > l && x1 + this.offset.click.left < r)) return false; @@ -555,6 +555,7 @@ $.extend($.ui.sortable, { getter: "serialize toArray", defaults: { + tolerance: "guess", distance: 0, delay: 0, cancel: ":input,button", -- 2.39.5