You found a bug! We've classified it as
EXTJS-20585
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
-
Sencha Premium User
Anchors incorrectly leave extra space in scrollable container
Ext JS 6.0.1
Fiddle: https://fiddle.sencha.com/#fiddle/16s3
extraspace.png
When an anchor with small positive offsets is inside a scrollable container, there is extra space left for the scrollbars even when none exist. This occurs in Firefox 45 and IE 11. Load the fiddle in its own window (https://fiddle.sencha.com/fiddle/16s3/preview) - it may be necessary to resize the screen a bit to get the scrollbars to disappear.
Based on the docs and behaviour in Ext JS 2.x, I would expect the inner panel to position itself so the right and bottom border are slightly outside the screen, and hide the borders on those sides.
This also occurs with nested containers.
It's also possible to repro something similar in Chrome, by setting negative x and y coordinates: https://fiddle.sencha.com/#fiddle/170s
Last edited by BobR; 26 May 2016 at 4:33 PM.
Reason: Happens with '0 0' too
-
Thanks for the report! I have opened a bug in our bug tracker.
-
Sencha Premium User
Turns out the 'Chrome' one actually repros when you resize the screen smaller even with x, y and anchors all at 0. This also happens on Firefox when in a nested component, but not on the outermost one. Not sure if it's worth opening a new bug for that - seems like it's probably the same root cause.
-
Sencha - Support Team
Not really sure what the end goal is. If you specify an offset to make the panel larger than it's container when scrollable is true, there will be calculations for the outer panel scrollbar pushing the inner panel inwards.
Maybe you need to create the internal panel as scrollable, or maybe even creating a panel with fit layout and add style to remove the right and bottom border.
Can you provide more details as to what the end result is?
Guilherme Lopes
Sencha Support
-
Sencha Premium User

Originally Posted by
guilherme.lopes
If you specify an offset to make the panel larger than it's container
As I said in my last post, this actually occurs even if all offsets are at 0, in Chrome: https://fiddle.sencha.com/#fiddle/1am2 (when you resize the viewport/browser window smaller after initial render).
It's not just an issue with borders; here's another example (after resize in Chrome): https://fiddle.sencha.com/#fiddle/1am4 -- fit is not suitable here as it does not give us control over the x and y coordinates as in this example. Additionally, we need this kind of anchoring in situations where there are many items in the container.
Say we want to pin a panel to the bottom and right but leave some space at the top (e.g. grid + search). This fiddle should do it: https://fiddle.sencha.com/#fiddle/1am5 -- however, if you resize the window smaller in Chrome it leaves that unused scrollbar space again.2016-05-20 10_29_15-[OPEN] Anchors with positive offsets incorrectly leave extra space in scroll.png
It's also a bit counter-intuitive that a positive anchor can actually result in a size smaller than the container. I would've expected the anchor size to be based on the outer/specified size of the container, not the size after scrollbar width/height is subtracted - the extra space should be accessible by scrolling, not resized to be smaller. The current behaviour leads to funny situations like here where 100 + 10 = 93, apparently: https://fiddle.sencha.com/#fiddle/1am3
-
Sencha Premium User
Hello, any word?
Do you need any additional info?
-
Sencha - Support Team
A bug has been filed for it, and this is all the info we need at the moment. I'll post here when we have this fixed.
Thanks,
Guilherme Lopes
Sencha Support
-
Can we have an update on this please? Cannot check status of tickets in support portal as the hover on the linked JIRA IDs always yields "Could not load".
-
Anyone? Been three months now.
-
29 Aug 2016, 10:26 PM
#10
Bump. Any ETA? Will fix be in 6.2?