Javascript, DHTML. Scrolling bug in Firefox.

Discussion in 'Javascript' started by borisov.gleb, Jul 21, 2007.

  1. borisov.gleb

    borisov.gleb Guest

    Hi, All!

    When I trying to do:
    this.ctrl.style.display = 'block';

    Firefox scroll area to the top, but IE not. I think that's bug. Maybe
    anyone knows how I can fix that?

    Thanks for advise.
    All the best, Gleb M. Borisov.
     
    borisov.gleb, Jul 21, 2007
    #1
    1. Advertisements

  2. borisov.gleb

    Evertjan. Guest

    What area?
    What is this referring to?
    what is ctrl referring to?
    What do you see as a bug, what IE does, or what FF does?
    What are they doing in fact?

    Could you please show us a minimalized example, preferably as an URL?
     
    Evertjan., Jul 21, 2007
    #2
    1. Advertisements

  3. borisov.gleb

    borisov.gleb Guest

    That is common Firefox feature. Then HTML-content changed it scroll up
    to the top focused item. (I think for anti-fishing and so-so-so).
    Solution is remember scrollTop of element and set it to old value
    after changing content.

    var oldTop = ctrl.scrollTop;
    this.ctrl.style.display = 'block';
    ctrl.scrollTop = oldTop;

    It works pretty but blinking sometimes.

    I would submit this issue to Mozilla bug tracker and if any comments -
    post it in this topic.

    Anyway thanks for attention.
    All the best, Gleb M. Borisov.
     
    borisov.gleb, Jul 21, 2007
    #3
  4. borisov.gleb

    Evertjan. Guest

    I too, do not like fishing, Gleb.
    I did not write any of this.
    Thank you for quoting, but PLEASE, do quote correctly!
    What is ctrl?
     
    Evertjan., Jul 21, 2007
    #4
  5. borisov.gleb

    borisov.gleb Guest

    I think it's not super-solution coz fisher can use trick with
    scrollTop.
    ctrl - div contains datagrid content.
    this - contextmenu "control" object. (some methods and some fields
    like ctrl, that contains link to html element).

    Sorry for broken qouting. This shouldn't happens again :)

    All the best, Gleb M. Borisov.
     
    borisov.gleb, Jul 21, 2007
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.