aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.resizable.js
diff options
context:
space:
mode:
authorEduardo Lundgren <eduardolundgren@gmail.com>2008-06-25 14:27:20 +0000
committerEduardo Lundgren <eduardolundgren@gmail.com>2008-06-25 14:27:20 +0000
commitfe9c525346769a40f945956db90490a836573642 (patch)
treea76ab3f61824d86e114081e43b308485eb33dfac /ui/ui.resizable.js
parent858627cf4f7aca9c1a9c8c026a9b2080a97fdf45 (diff)
downloadjquery-ui-fe9c525346769a40f945956db90490a836573642.tar.gz
jquery-ui-fe9c525346769a40f945956db90490a836573642.zip
Fix #3026 - Plugins callbacks need to be called first and user callbacks at the end
Diffstat (limited to 'ui/ui.resizable.js')
-rw-r--r--ui/ui.resizable.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/ui.resizable.js b/ui/ui.resizable.js
index 0b2e02e3a..8ce8ee979 100644
--- a/ui/ui.resizable.js
+++ b/ui/ui.resizable.js
@@ -229,7 +229,7 @@ $.widget("ui.resizable", $.extend($.ui.mouse, {
},
propagate: function(n,e) {
$.ui.plugin.call(this, n, [e, this.ui()]);
- this.element.triggerHandler(n == "resize" ? n : ["resize", n].join(""), [e, this.ui()], this.options[n]);
+ if (n != "resize") this.element.triggerHandler(["resize", n].join(""), [e, this.ui()], this.options[n]);
},
destroy: function() {
var el = this.element, wrapped = el.children(".ui-resizable").get(0);
@@ -325,6 +325,9 @@ $.widget("ui.resizable", $.extend($.ui.mouse, {
data = this._respectSize(data, e);
+ // plugins callbacks need to be called first
+ this.propagate("resize", e);
+
el.css({
top: this.position.top + "px", left: this.position.left + "px",
width: this.size.width + "px", height: this.size.height + "px"
@@ -335,8 +338,9 @@ $.widget("ui.resizable", $.extend($.ui.mouse, {
this._updateCache(data);
- this.propagate("resize", e);
-
+ // calling the user callback at the end
+ this.element.triggerHandler("resize", [e, this.ui()], this.options["resize"]);
+
return false;
},
mouseStop: function(e) {