mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Fix #3026 - Plugins callbacks need to be called first and user callbacks at the end
This commit is contained in:
parent
858627cf4f
commit
fe9c525346
@ -229,7 +229,7 @@ $.widget("ui.resizable", $.extend($.ui.mouse, {
|
|||||||
},
|
},
|
||||||
propagate: function(n,e) {
|
propagate: function(n,e) {
|
||||||
$.ui.plugin.call(this, n, [e, this.ui()]);
|
$.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() {
|
destroy: function() {
|
||||||
var el = this.element, wrapped = el.children(".ui-resizable").get(0);
|
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);
|
data = this._respectSize(data, e);
|
||||||
|
|
||||||
|
// plugins callbacks need to be called first
|
||||||
|
this.propagate("resize", e);
|
||||||
|
|
||||||
el.css({
|
el.css({
|
||||||
top: this.position.top + "px", left: this.position.left + "px",
|
top: this.position.top + "px", left: this.position.left + "px",
|
||||||
width: this.size.width + "px", height: this.size.height + "px"
|
width: this.size.width + "px", height: this.size.height + "px"
|
||||||
@ -335,7 +338,8 @@ $.widget("ui.resizable", $.extend($.ui.mouse, {
|
|||||||
|
|
||||||
this._updateCache(data);
|
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;
|
return false;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user