Results 1 to 5 of 5

Thread: Uncaught TypeError: Cannot set property 'scrollTop' of null in Chrome 39.0.2171.99 m

    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Mar 2008
    Posts
    29

    Default Uncaught TypeError: Cannot set property 'scrollTop' of null in Chrome 39.0.2171.99 m

    Ext version tested:
    • Ext 5.1.0.107
    Browser versions tested against:
    • Chrome 39.0.2171.99 m
    DOCTYPE tested against:
    • ____
    Description:
    • Uncaught TypeError: Cannot set property 'scrollTop' of null in Chrome console
    • if(Ext.supports.Touch){document.body.scrollTop=0} in app.js
    OS:Windows 8.1

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report. Can you please post a test case which reproduces this issue?
    https://fiddle.sencha.com/#home

  3. #3
    Sencha User
    Join Date
    Mar 2008
    Posts
    29

    Default

    It is probably because of scrollable:true in my viewport.
    I set it to false ,it's work ok.
    There are left menus based on accordition on viewport's west.

  4. #4
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,018

    Default

    Yes, if Ext.supports.Touch is true, then Viewport's afterLayout fails, because document.body is null.
    Code:
    afterLayout: function(layout) {
        if (Ext.supports.Touch) {        
            document.body.scrollTop = 0;
        }
        this.callParent([layout]);
    }
    Somehow it is only reproducible with a Viewport's "scrollable: true".
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  5. #5

    Default

    This is still present in Ext 6.0.2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •