Results 1 to 2 of 2

Thread: How to prevent the page scrolling to the label that I just updated?

  1. #1
    Sencha User
    Join Date
    May 2011
    Posts
    1

    Default How to prevent the page scrolling to the label that I just updated?

    I have a counter in a page that is a little long.
    When I updated some label's text, the page just scrolled to the position of the label.
    So the user cant read the page at all, for the page keep scrolling.
    Here is some detail. the definition of the label
    Code:
          
    {
            xtype: 'label',
            itemId: 'staytime',
            border: false,       
            margin: '0 10'  
    }
    I use this code to update the label's text. the "me" is the panel and the "count" works fine
    Code:
     
    me.on('render', function () {
         Ext.util.TaskManager.start({
             run: function () {
                 me.count++;
                 me.down('#staytime').update(me.count+' seconds');
             },
             interval: 1000,
             scope: me
         });
     });
    yes, all works fine, just the page will scroll to the "staytime" label.
    Is it can be avoided or I have done something wrong?
    Any help is appreciated.

  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    Hi,

    Can you share a test case that demonstrates the issue? I'm not seeing the same issue when I test, but perhaps I've not captured the use case very well.

    You can share a test case at https://fiddle.sencha.com if you'd like.

    My attempt:


Tags for this Thread

Posting Permissions

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