focus causing browser lurching

A

Alex Calder

How's that for a subject line? :)

OK, here's the deal.

I have a web page that features a Flash movie about halfway down the
page, and inside that Flash movie is content that typically exceeds
the height of the movie, and accordingly, scrolls via use of a scroll
bar.

I've been testing out this page on friends, and the common complaint
is --

When using the roller wheel on the mouse, the whole browser page
scrolls, but there's no way to scroll the content in the Flash window.
(Don't worry, I'll get to the Javascript question here in moment.)

So, by use of the onMouseWheel listener in Flash, the user can now
scroll the Flash content using their roller wheel on their mouse --
but only if the Flash movie is in focus.

So, now, the roller wheel scrolls the browser page, unless they click
on / in the Flash movie, thus the movie takes focus and now the roller
wheel controls the Flash movie.

So, I added Javascript code to the div tag for the Flash movie,
setting it up where the div takes focus on mouseover, and releases
focus (blur) upon mouseout. This gets me about 99% of the way there,
as the roller wheel now rolls the browser page, but upon mousing over
the Flash, the movie takes focus and the roller wheel controls the
Flash movie, and once moused out of the movie, you control the browser
page again. Sweet.

The only problem left? When you mouse over the movie, the focus
taking causes the top of the div tagged area to lurch to the top of
the viewable browser window display.

Is there a way to allow something to take focus without it jumping to
the top of the page? Does it involve noting the browser scroll
position, setting the focus, then resetting the browser scroll
position again? Or is it easier? Or not possible at all to change
that focus behavior?

Thanks to everybody for any assistance you can provide. I appreciate
the help.

Alex
 
T

Tom Cole

Alex said:
How's that for a subject line? :)

OK, here's the deal.

I have a web page that features a Flash movie about halfway down the
page, and inside that Flash movie is content that typically exceeds
the height of the movie, and accordingly, scrolls via use of a scroll
bar.

I've been testing out this page on friends, and the common complaint
is --

When using the roller wheel on the mouse, the whole browser page
scrolls, but there's no way to scroll the content in the Flash window.
(Don't worry, I'll get to the Javascript question here in moment.)

So, by use of the onMouseWheel listener in Flash, the user can now
scroll the Flash content using their roller wheel on their mouse --
but only if the Flash movie is in focus.

So, now, the roller wheel scrolls the browser page, unless they click
on / in the Flash movie, thus the movie takes focus and now the roller
wheel controls the Flash movie.

So, I added Javascript code to the div tag for the Flash movie,
setting it up where the div takes focus on mouseover, and releases
focus (blur) upon mouseout. This gets me about 99% of the way there,
as the roller wheel now rolls the browser page, but upon mousing over
the Flash, the movie takes focus and the roller wheel controls the
Flash movie, and once moused out of the movie, you control the browser
page again. Sweet.

The only problem left? When you mouse over the movie, the focus
taking causes the top of the div tagged area to lurch to the top of
the viewable browser window display.

Is there a way to allow something to take focus without it jumping to
the top of the page? Does it involve noting the browser scroll
position, setting the focus, then resetting the browser scroll
position again? Or is it easier? Or not possible at all to change
that focus behavior?

A link to the problem page (if available) would be very helpful. If you
friends can see it I assume we can too....

Giving something focus would not cause it to move. There's something
else going on there, it will be much easier to figure that out if we
can see the page contents.
 

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top