Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Applet steals focus...

3 views
Skip to first unread message

Andrew Thompson

unread,
Jan 6, 2004, 2:34:54 PM1/6/04
to
Some time ago I noticed an irritating quirk in
applets, they tend to 'steal the focus' of a web
page and prevent scrolling using the keyboard.

At the time I was dealing with applets that had
focusable components, and resolved that when
I had time I'd sort out what I was doing wrong.

Now my 'test case' Applet, with only a single
Label, and just 4 lines of actual code, is doing
the same thing. The URL is..
http://www.physci.org/test/focus/

There is a link to the entire 4 lines of code
on the web page itself.

So far I have tested this on IE 6 & Mozilla
1.3 on XP, both sit stubbornly at the top of
the page. Interestingly, NN 4.8 (a thoroughly
archaic browser) had no problems with it.

So, my questions are.
Does this behaviour occur in _your_ browser?
(If so, make, model, OS ..please)

Is there something I forgot? Is there anything
I can do to prevent this iritating behaviour
from happening?

TIA

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site


Andrew Thompson

unread,
Jan 6, 2004, 2:42:59 PM1/6/04
to
"Andrew Thompson" <andr...@bigNOSPAMpond.com> wrote in message
news:y5EKb.80685$aT.4...@news-server.bigpond.net.au...

| Some time ago I noticed an irritating quirk in
| applets, they tend to 'steal the focus' of a web
| page and prevent scrolling using the keyboard.

Whoops! Forgot to mention that usually
the page allows scrolling before the Applet
is fully loaded and started (it's <1Kb).

To see the effect, you need to wait till the
'Scroll Me..' label appears.


Andrew Thompson

unread,
Jan 9, 2004, 4:16:01 PM1/9/04
to
Since the GUI experts have no response, I'm
casting this wider..

"Andrew Thompson" <andr...@bigNOSPAMpond.com> wrote in message
news:y5EKb.80685$aT.4...@news-server.bigpond.net.au...

| Some time ago I noticed an irritating quirk in
| applets, they tend to 'steal the focus' of a web
| page and prevent scrolling using the keyboard.
|
| At the time I was dealing with applets that had
| focusable components, and resolved that when
| I had time I'd sort out what I was doing wrong.
|
| Now my 'test case' Applet, with only a single
| Label, and just 4 lines of actual code, is doing
| the same thing. The URL is..
| http://www.physci.org/test/focus/

Note that the effect I describe only happens
after the label appears, the page will scroll OK
prior to that

Andrew Thompson

unread,
Jan 12, 2004, 7:42:56 AM1/12/04
to
What? Nobody?? Hello.. yoo-hoo!

I at least want to hear if the behaviour occurs
on other browsers/platforms before I put
a 'fault report' (whatever) into Sun..

Oh, ComeON...

"Andrew Thompson" <andr...@bigNOSPAMpond.com> wrote in message

news:lSELb.3175$Wa....@news-server.bigpond.net.au...

Andrew Harker

unread,
Jan 12, 2004, 9:43:13 AM1/12/04
to
Andrew Thompson wrote (even top posted :-) :

> What? Nobody?? Hello.. yoo-hoo!
>
> I at least want to hear if the behaviour occurs
> on other browsers/platforms before I put
> a 'fault report' (whatever) into Sun..
>
> Oh, ComeON...

> | | http://www.physci.org/test/focus/

> | | So far I have tested this on IE 6 & Mozilla
> | | 1.3 on XP, both sit stubbornly at the top of
> | | the page. Interestingly, NN 4.8 (a thoroughly
> | | archaic browser) had no problems with it.
> | |
> | | So, my questions are.
> | | Does this behaviour occur in _your_ browser?
> | | (If so, make, model, OS ..please)

Just tried with opera 7.23 on WinXP and I could PgUP/Down
after the applet label was displayed, also Netscape Communicator
4.79. Did not workwith Netscape 7.1 (WinXP) or Mozilla 1.5
(Win98). Don't have a *nix box to hand right now.

(BTW there is only one WinXP and Win98 box so there is
a working and non-working on same box)

There appears to be quite a few posts on focus and applets on
the forum.java.sun.com site and also developer.java.sun.com
in the bugs database.

cheers
--
Andrew

The trouble with having an open mind, of course, is that people
will insist on coming along and trying to put things in it.
-- (Terry Pratchett, Diggers)

Jim Sculley

unread,
Jan 12, 2004, 12:58:48 PM1/12/04
to
Andrew Thompson wrote:
> What? Nobody?? Hello.. yoo-hoo!
>
> I at least want to hear if the behaviour occurs
> on other browsers/platforms before I put
> a 'fault report' (whatever) into Sun..

Confirmed on Windows XP with Mozilla 1.4 and 1.6b.

See bugs:

4673513 (closed as 'not a bug')
4676801 (closed as duplicate of above bug)
4896496 (closed, will not be fixed) - closely matches your description

The bug was introduced when a fix was implemented for the opposite
problem. Applets that *wanted* focus weren't getting it (on IE).

Jim S.

P.S. Please don't put line numbers in the HTML version of your source
code. It makes cut and paste impossible, which hinders the 'compilable'
aspect of a SSCCE.

--
Remove my extraneous mandibular appendages to reply via e-mail

Andrew Thompson

unread,
Jan 12, 2004, 1:58:46 PM1/12/04
to
"Andrew Thompson" <andr...@bigNOSPAMpond.com> wrote in message
news:kDwMb.8055$Wa....@news-server.bigpond.net.au...

Update.. A kindly Mac user has given me
the following run-down..

> Works fine (i.e. scrolls via keyboard) in IE 5.2
> under Mac OS 9, IE 5.2 under Mac OS X, Netscape 7.0
> under Mac OS X, and Safari 1.0 under Mac OS X.

Crap! Now, why does it completely fail to
surprise me that it's Windows...

Could I get some Linux users to confirm it
is not a problem on Linux, just to further
pin it down?

Jim Sculley

unread,
Jan 12, 2004, 3:03:09 PM1/12/04
to
Andrew Thompson wrote:

> "Andrew Thompson" <andr...@bigNOSPAMpond.com> wrote in message
> news:kDwMb.8055$Wa....@news-server.bigpond.net.au...
>
> Update.. A kindly Mac user has given me
> the following run-down..
>
>
>>Works fine (i.e. scrolls via keyboard) in IE 5.2
>>under Mac OS 9, IE 5.2 under Mac OS X, Netscape 7.0
>>under Mac OS X, and Safari 1.0 under Mac OS X.
>
>
> Crap! Now, why does it completely fail to
> surprise me that it's Windows...
>
> Could I get some Linux users to confirm it
> is not a problem on Linux, just to further
> pin it down?

Linux with Konqueror 3.1.4 - broken
Linux with Mozilla Firebird 0.7 - OK
Linux with Mozilla 1.4 - OK

Jim S.

Andrew Thompson

unread,
Jan 12, 2004, 3:32:30 PM1/12/04
to
"Andrew Harker" <and...@sadNOSPAMPLEASEgeeks.com> wrote in
message news:4002b3b2.0@entanet...
<snip good stuff>
Thanks for the info Andrew, added to the list..

| There appears to be quite a few posts on focus and applets on
| the forum.java.sun.com site and also developer.java.sun.com
| in the bugs database.

I had a trawl through them, but the first
hundred or so I saw were focus problems
of a much more mundane nature.

Unfortunately I was unable to think of a
good way to sort the dross, so I gave up.

[ And the top-posting? I knew that if I
got irritating enough, somebody would
answer me, if only to shut me up.
..That's my story, and I'm sticking to it! ;-) ]

ak

unread,
Jan 12, 2004, 5:29:25 PM1/12/04
to
> See bugs:
>
> 4673513 (closed as 'not a bug')
> 4676801 (closed as duplicate of above bug)
> 4896496 (closed, will not be fixed) - closely matches your description

Typical SUN!
How often I read this shit - "not a bug", "duplicate", "will not be fixed"
:-((

____________

http://reader.imagero.com the best java image reader.


Andrew Thompson

unread,
Jan 12, 2004, 7:42:36 PM1/12/04
to
"Jim Sculley" <nice...@wisdomteeth.comcast.net> wrote in message
news:btun3...@enews2.newsguy.com...
..

| The bug was introduced when a fix was implemented for the
opposite
| problem. Applets that *wanted* focus weren't getting it (on
IE).

Thanks Jim. _This_ bug'll finally stop bugging
y'all about it. It is a real pity though, as now I
am reluctant to put _any_ applets in my
(non-IT) sites.

[ As far as I am concerned, such a problem
ruins a page for anyone that typically only
uses a keyboard. I want my pages to be
_accessible_ ]

| P.S. Please don't put line numbers in the HTML version of your
source
| code. It makes cut and paste impossible, which hinders the
'compilable'
| aspect of a SSCCE.

Yes, true. I will offer a link to the
'raw source' from that same page
that offers the formatted source.

Andrew Thompson

unread,
Jan 25, 2004, 9:51:24 PM1/25/04
to
"Andrew Thompson" <andr...@bigNOSPAMpond.com> wrote in message
news:lSELb.3175$Wa....@news-server.bigpond.net.au...

| | Some time ago I noticed an irritating quirk in
| | applets, they tend to 'steal the focus' of a web
| | page and prevent scrolling using the keyboard.
| |
| | At the time I was dealing with applets that had
| | focusable components, and resolved that when
| | I had time I'd sort out what I was doing wrong.
| |
| | Now my 'test case' Applet, with only a single
| | Label, and just 4 lines of actual code, is doing
| | the same thing. The URL is..
| | http://www.physci.org/test/focus/
|
| Note that the effect I describe only happens
| after the label appears, the page will scroll OK
| prior to that
|
| | There is a link to the entire 4 lines of code
| | on the web page itself.

I _think_ I have a fix...
You are not gonna believe the source of it.. ;-)

http://www.physci.org/test/focus/
The index.jsp page should be scrollable, it
has three buttons. There is a link to the original
page at scroll,jsp (..well ok, I've added styles,
changed the name, yada yada ..it still does not
scroll)

0 new messages