Home - Forums-.NET - FlyTreeView (ASP.NET) - FlyContextMenu & Browser's Scrollbar Position

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

FlyContextMenu & Browser's Scrollbar Position
Link Posted: 03-Oct-2007 04:41
Hi!

I have a problem when using the FlyContextMenu on large tree's.
When I have to scroll down (browser scrollbar) to right-click a particular node (e.g. in the middle of the browser window), on click the whole page is scrolling downwards. So the selected node and it's context menu is moving upwards -> away from the mouse cursor.
Seems to be a browser \"problem\" or maybe just a setting (??)
I tried this out with IE6, IE7 and Firefox.
In Firefox it works fine ... but not in IE.

Does anybody have an idea how to prevent this?
Or maybe a workaround?

Thanks a lot

greetz
Link Posted: 03-Oct-2007 05:02
Do you have some absolute positioned parent elements, frame or something like this that could break context menu positioning?

I just took experiment and created a small test case with many nodes and context menu.
Here what I get (all OK as expected):
Link Posted: 03-Oct-2007 05:24
No, no elements with absolute position.

Only an updateprogress where an  with absolute position is used. But I have the same effect when I exclude that.

There are a lot of DIV tags around my treeviews. In the masterpage and also in content page until the tree is embedded.
So i checked the stylesheet, but I didn't find anything that says \"absolute position\"

I could post the source, but the aspx itself has 500 lines :-\\
Link Posted: 03-Oct-2007 05:57
It can be much better if you create a standalone sample ASPX page and put it to ftp://download.9rays.net/9r_incoming/ . So we can debug and fix it locally.
Link Posted: 03-Oct-2007 07:15
ok, i'll try to reconstruct it in a simple webform .... tomorrow ;-)
Link Posted: 03-Oct-2007 23:34
Hi again,

I have put Test_FlyContextMenu.zip on the FTP.

I tried to reconstruct my Page piece by piece using a disconnected data source, and could finally reconstruct the described problem.

The problem occurs since i added the DIV \"divAllDetails\"
Line 107 - 158 in the .aspx
And it seems that the window is scrolling exactly the same range than the size (height) of this div.... when you right-click a node in the tree.

I analyzed the code of this div, but i don't have any idea what's wrong here.
I hope you can help.

Thx
Link Posted: 04-Oct-2007 02:13
I see. I'll try to investigate and get back to you here asap.
Link Posted: 04-Oct-2007 08:48
Finally.
I moved context menu declarations from table to the end of page (right before closing FORM tag) and this seems to be a workaround for the issue.
Link Posted: 04-Oct-2007 23:01
Thanks for pointing.

It looks better now. But it's still jumping sometimes. Especially when you click a node which is displayed on the bottom of the browser window.
It looks like \"something\" wants to focus the clicked node by moving it closer to the middle of the browser window ... strange.
When I scroll down the window to bring the node to the upper or middle part of the window then it works fine.

That's my experience to this.
Do you have the same behaviour?
I tried this in the webform I sent you.

Maybe I can do another workaround by placing a footer that always takes 50px on the bottom of the window.
Would be interesting ... I'll try out
Link Posted: 04-Oct-2007 23:19
Yes, jumping here also. I'll try to figure out whats the reason.