-
26 Feb 2012 8:23 AM #1
[EXT 4.0.x, 4.1pr] Can not cancel resize
[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).
-
28 Feb 2012 6:30 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,117
- Vote Rating
- 453
Did you try with the beforeresize event on the Ext.resizer.Resizer?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
28 Feb 2012 6:33 PM #3
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.
-
28 Feb 2012 6:39 PM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,117
- Vote Rating
- 453
The resize event is not cancelable. The beforeresize event on the Ext.resizer.Resizer is the only resize event that can cancel a resize.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
28 Feb 2012 6:45 PM #5
We should re-classify as a documentation bug, then. resizedrag says "Fires during resizing. Return false to cancel resize."
-
16 Oct 2012 10:05 PM #6
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
-
6 Jan 2013 2:26 PM #7Sencha User
- Join Date
- Oct 2007
- Location
- Katoomba, Blue Mountains, west of Sydney, Australia
- Posts
- 319
- Vote Rating
- 3
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! :-)
Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.


Reply With Quote