Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    18
    Vote Rating
    0
    zhaoshixuan is on a distinguished road

      0  

    Default Can't get scrollTop in Chrome

    Can't get scrollTop in Chrome


    Hi, I use floating panel and need to set its position according to the browser's scrollTop.
    In FF, I can use Ext.getBody().dom.scrollTop or document.documentElement.scrollTop to get this value.
    But in Chrome, I used Ext.getBody().dom.scrollTop, document.documentElement.scrollTop and document.body.scrollTop. None of them works.
    Could anyone have this solution?
    Thanks!
    BTW: I tested on Ext3.3's examples, and it didn't work either

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,912
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Please provide a small test case for us to review.

    Scott.

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    18
    Vote Rating
    0
    zhaoshixuan is on a distinguished road

      0  

    Default


    Maybe there is something wrong in our project.
    I tried it with original ext, there is no such problem.

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    18
    Vote Rating
    0
    zhaoshixuan is on a distinguished road

      0  

    Default


    Quote Originally Posted by scottmartin View Post
    Please provide a small test case for us to review.

    Scott.
    Hi Scott,
    I found the reason.
    If I use viewport as the page body, this situation will appear in Chrome.
    Any suggestion?
    You can use the sample below:
    Code:
    <%@ page language="java" contentType="text/html; charset=utf-8"    pageEncoding="utf-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css" href="js/ext-3.3.0/ext-3.3.0/resources/css/ext-all.css"/>
    <script type="text/javascript" src="js/ext-3.3.0/ext-3.3.0/adapter/ext/ext-base-debug.js"></script>
    <script type="text/javascript" src="js/ext-3.3.0/ext-3.3.0/ext-all-debug.js"></script>
    <title>Insert title here</title>
    <script type="text/javascript">
    Ext.onReady(function(){
    	var panel = new Ext.FormPanel({
    		height : 2000,
    		title : 'test',
    		width:300,
    		autoScroll : true
    	});
    	var view = new Ext.Viewport({
    		renderTo : 'body',
    		items : [panel],
    		autoScroll : true,
    		layout : 'border'
    	});
    });
    </script>
    </head>
    <body id="body">
    
    
    </body>
    </html>

  5. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,912
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    I will have to test in the morning .. few issues:
    remove the renderTo .. viewport will always default to the entire browser
    remove autoScroll.. assign this to the containers in viewport

    See if this helps.

    Scott.

  6. #6
    Sencha User
    Join Date
    Oct 2011
    Posts
    18
    Vote Rating
    0
    zhaoshixuan is on a distinguished road

      0  

    Default


    Quote Originally Posted by scottmartin View Post
    I will have to test in the morning .. few issues:
    remove the renderTo .. viewport will always default to the entire browser
    remove autoScroll.. assign this to the containers in viewport

    See if this helps.

    Scott.
    Well, they don't work, either.
    And if I remove autoScroll, the scroll bar will disappear and the bottom will never be seen.
    I also found same problem in Ext 4.0.7-gpl
    Code:
    Ext.require([    'Ext.form.*',
        'Ext.layout.container.Absolute',
        'Ext.window.Window'
    ]);
    
    
    Ext.onReady(function() {
        var form = Ext.create('Ext.form.Panel', {
            defaultType: 'textfield',
            border: true,
            height : 2000,
            title : 'test',
            autoScroll : true
        });
    
    
        var win = Ext.create('Ext.container.Viewport', {
            
            height: 850,
            //plain:true,
            items: form,
            autoScroll : true
        });
    
    
    });

  7. #7
    Sencha User
    Join Date
    Oct 2011
    Posts
    18
    Vote Rating
    0
    zhaoshixuan is on a distinguished road

      0  

    Default


    Could some one do me a favor?
    I really think it is a problem.
    Please help resolve compatible problem among different browsers.
    Thanks!

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi