-
30 Mar 2009 5:02 PM #11
Moving it to Bugs works for me. The example in the first post works to demonstrate as long as the script paths are updated.
-
30 Mar 2009 5:38 PM #12
OK, moving.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
30 Mar 2009 10:03 PM #13Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
In standards mode the body will be the height of the content, so it can't scroll.
If you want the body to scroll you should make the body the height of the viewport, e.g.
Code:html { height: 100%; overflow: hidden; } body { height: 100%; overflow: auto; }
-
31 Mar 2009 6:02 AM #14
That works! Thanks for the input.
However, it results in strange margins that have to be corrected in a container div to maintain the existing layout.
So it is not a drop in replacement without forcing structural HTML changes on the end user. I wonder if it wouldn't be easier to incorporate the window scroll animation into Ext?
Thanks again, Condor.
-
26 Apr 2009 6:50 AM #15
-
26 Apr 2009 10:39 PM #16
Thanks digerata, your solution with window.scroll is the way to go because it works in all the major browsers.
The suggestion of using the following styling in conjunction with Ext Js' .scrollTo method
almost works, but it fails in Safari.Code:html { height: 100%; overflow: hidden; } body { height: 100%; overflow: auto; }
-
27 Apr 2009 5:13 AM #17
Yeah, that's the important thing. It just works and without having to change your markup to support it. (Not to mention all other JS libraries do it that way) Hopefully, a solution using window.scroll animation will get added into Ext.
-
24 Aug 2010 9:39 AM #18
I am having the same issue (still not fixed as of Ext 3.2.1). I need to scroll the document body but I need to use standards mode so all my non ExtJS stuff renders correctly cross-browser. Here's a simplified solution that works with the ext adapter and doesn't require a new 'scrollWindow' animation type. I override the scroll animation to use scrollTo() for the body element and scrollLeft/scrollTop for any other element.
Code:Ext.override(Ext.lib.Scroll, { setAttr : function(attr, val, unit) { var me = this; if(attr == 'scroll'){ if(me.el == Ext.getBody().dom) { window.scrollTo(val[0], val[1]); } else { me.el.scrollLeft = val[0]; me.el.scrollTop = val[1]; } }else{ superclass.setAttr.call(me, attr, val, unit); } } });



Reply With Quote
