Wait! Looks like we don't have enough information to add this to bug database. Please follow this
template bug format.
-
Ext JS Premium Member
[EXT 4.0.x, 4.1pr] Can not cancel resize
ISSUE: After applying a listener to the resize and/or resizedrag events, returning false will not cancel the resize.
The source code appears to be lacking any implementation for handling the return value; this looks to be true in the source for Resizer and ResizeTracker in both ExtJS 4.0.7 and 4.1.
In fact, if you override the "onResize" method of resizer and simply have it return false, it does not adversely impact the resizing. (Well, it's bad, in that the resize should be cancelled.)
When fixing this bug, it could also be made more clear what canceling on a resize vs. a resizedrag will do. For example, if I return false on a resizedrag, I would think it should just not let me continue to resize (beyond, say, some sort of boundary condition that I implement in my app); it should not return to its original size... but when I return false on a resize, perhaps it should return to its original size? Seems like something that should be customizable like DragDrop (and ResizeTracker is a DragTracker).
-
Did you try with the beforeresize event on the Ext.resizer.Resizer?
-
Ext JS Premium Member
No, I don't think I did. Not the use-case I was going after; I needed to cancel (or, really, to intercept control of) a resize when the object hit a particular boundary.
-
The resize event is not cancelable. The beforeresize event on the Ext.resizer.Resizer is the only resize event that can cancel a resize.
-
Ext JS Premium Member
We should re-classify as a documentation bug, then. resizedrag says "Fires during resizing. Return false to cancel resize."
-
Sencha User
8 months passed and the docs still say "Fires during resizing. Return false to cancel resize." for the resizedrag-event...
Please fix this, i just wasted 1 1/2 hour looking for the info that the docs are not correct.
Thanks
-
Sencha User
Ditto re docs. I was debugging for a while before I discovered this post. Please correct the docs to remove "Return false to cancel resize." for resizedrag.
Or even better - allow the resize to be cancelled! :-)
-
Sencha Premium Member
Got bitten by need to cancel resize on resizeDrag too
Just needed that feature today, be able to cancel a resize on resizeDrag event. The resize might be allowed for a couple of pixels and then be cancelled when some algorithm concludes that further resize is not allowed. There is no way to do that now?
I'd say this is more than a doc bug, it's a missing feature.