Solved

Extension Development: Frozen Firefox scrollbar and dis-functional hot-keys

Posted on 2011-02-20
1
481 Views
Last Modified: 2013-12-07
Hello all,

I am writing a Firefox extension which creates a Java applet in the page.

function addApplet(aDocument,url,classfile,archive) {
if (navigator.javaEnabled()) {
var anApplet,body;
body = aDocument.getElementsByTagName('body')[0];
anApplet = aDocument.createElement('applet');
anApplet.setAttribute('CODEBASE',url);
anApplet.setAttribute('code',classfile);
anApplet.setAttribute('archive',archive);
anApplet.setAttribute('name',"Applet");
anApplet.setAttribute('width',"0");
anApplet.setAttribute('height',"0");
body.appendChild(anApplet);
}
}

The JAR file loaded from the applet is 500KB in size. I noticed that sometimes the extension causes Firefox's vertical scrollbar to freeze and the hot-keys to stop working. The scroll-bar and hot-keys work fine if I prevent the extension to append the applet to the page.

Another weird behavior is -- on the frozen page if I click inside any text/search box or even address bar the scroller and the hotkeys begin to work again. The same thing happens if I switch tabs or minimize the browser window.

I am using Firefox 3.6.12 on WindowsXP.

Please help me if you have an idea regarding this or if I should provide more information.

Thanks
0
Comment
Question by:imreaper
1 Comment
 

Accepted Solution

by:
imreaper earned 0 total points
ID: 34940532
I think I have found a way around to this problem:

Solution:
This behavior is the default since JDK 1.3. However you might need to prevent the applet from getting focus on startup, for example, if your applet is invisible and does not require focus at all. In this case, you can set to false the special parameter initial_focus in the HTML tag, as follows:

<applet code="MyApplet" width=50 height=50>
*<param name=initial_focus value="false">*</applet>

Open in new window

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Now-a-days, indirectly, postal services have been replaced by email services. Yes, whenever we hear the word "email" a lot of people only think of gmail. Some people still think that email and gmail are one and the same thing :-). Let's see some …
I recently found myself in a Corporate Situation where the client had requested blocking access to any and all websites except his own Domain? Easy? I am sure this would be your answer but their requirement was, this has to be done without using…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question