Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > focus causing browser lurching

Reply
Thread Tools

focus causing browser lurching

 
 
Alex Calder
Guest
Posts: n/a
 
      09-16-2006

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
 
Reply With Quote
 
 
 
 
Tom Cole
Guest
Posts: n/a
 
      09-16-2006

Alex Calder wrote:
> 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.

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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Performance Issue: Canon Lenses or Camera Body Causing Softer Focus eatmorepies Digital Photography 5 07-17-2010 03:31 AM
Re: Performance Issue: Canon Lenses or Camera Body Causing Softer Focus David J Taylor Digital Photography 12 07-15-2010 10:11 AM
this.window.focus() vs. window.focus() vs. this.focus() Roger Javascript 3 03-08-2007 08:53 PM
JS Alert Causing Loss Of Window Focus??? Robert Nurse Javascript 2 11-08-2004 04:17 PM
F4 key causing problems in IE browser Computer Support 1 05-25-2004 11:18 PM



Advertisments