Javascript, DHTML. Scrolling bug in Firefox.

B

borisov.gleb

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.
 
E

Evertjan.

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?

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?
 
B

borisov.gleb

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.
 
E

Evertjan.

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).

I too, do not like fishing, Gleb.
Solution is remember scrollTop of element and set it to old value
after changing content.

I did not write any of this.
Thank you for quoting, but PLEASE, do quote correctly!
var oldTop = ctrl.scrollTop;

What is ctrl?
 
B

borisov.gleb

I too, do not like fishing, Gleb.

I think it's not super-solution coz fisher can use trick with
scrollTop.
What is ctrl?

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top