Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Firefox > Setting focus on div with Mozilla

Thread Tools

Setting focus on div with Mozilla

Posts: n/a
During testing <div style="overflow:auto;"> in CSS I noticed the
mousewheel would work in Mozilla only after I made a <a href="#">some
text</a> link and clicked on that, within the div.

It appears as if Mozilla needs to have the focus set on that div in
order for the mousewheel to work. That's all that link does. The
mousewheel works perfectly in IE without the link. It scrolls the div
even if there is a scrollbar on the page.

Why am testing? That's because there is sites 'out there' that use
scrolling div's and I discovered that I could not use my mousewheel to
scroll when I used Mozilla. In IE it works by placing the cursor
anywhere inside the div.

With the link inside the div the scrolling works on IE even for
keyboard users, even if it may be a nightmare the keys takes you thru
the links and when the link in the div is focused you can scroll it
with the arrow keys.

Why does that not work in other browsers and is there a way (others
than I described abow) to make it work? But remember now, I know about
the "usability no-no" but I would like to know since I would like to
use the scrolling on sites where they use the scrolling div's.

Is there any reason (according to standard or something else) why
Mozilla can't scroll without setting the focus, and is there any other
way to do it. If the "usability no-no" is the reason why standard
compliant (is it the right word?) browser don't support it, then why
support the scrolling divs at all?


Top posters will be ignored. Quote the part you
are replying to, no more and no less! And don't
quote signatures, thank you.
Reply With Quote

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
<div ... /> and <div ...></div> K Viltersten ASP .Net 4 03-31-2009 07:33 PM
emulating window.focus in Body onload() event and setting focus to a control on same page Jason ASP .Net 4 05-07-2007 05:54 PM
this.window.focus() vs. window.focus() vs. this.focus() Roger Javascript 3 03-08-2007 08:53 PM
NS/FF don't change div offsetWidth when div innerHTML is added toand div becomes wider mscir Javascript 3 06-26-2005 04:04 PM
Q: Div A inside Div B is larger than Div B Dwayne Madsen Javascript 1 06-01-2005 03:02 PM