Focus can't be transferred between two GtkMozEmbed widgets in the same window



Core Graveyard
Embedding: GTK Widget
9 years ago
6 years ago


(Reporter: Xianzhu Wang, Unassigned)


Firefox Tracking Flags

(Not tracked)



(1 attachment)



9 years ago
User-Agent:       Mozilla/5.0 (Linux; U; en-US; rv: Gecko/20070309 Firefox/3.0.1
Build Identifier: 

When two GtkMozEmbed widgets are embedded in the same window, input focus can't be transferred directly from one to another by mouse click.

Reproducible: Always

Steps to Reproduce:
1. Compile and run the attached source code (slightly modified from TestGtkEmbed.)
2. Enter any URL containing at least one text input box (e.g.
3. Click the text input box in the first browser to give it the focus
4. Click the text input box in the second browser
Actual Results:  
Focus can't be transferred to the input text box second browser.  However, I can first click other place to remove the focus from the first browser and then can successfully give focus to the second browser.

Expected Results:  
Focus should be transferred correctly.

Comment 1

9 years ago
Created attachment 374890 [details]
Test source code modified from TestGtkEmbed.cpp

Though focus can't be transferred between the embedded browsers by click, the tab key can transfer focus normally.

Comment 2

9 years ago
Like bug 490444, this bug also reproduces in Firefox-equivalent version 2.0, 3.0 and 3.5b4.

Comment 3

8 years ago
I found a workaround method:

In widget/src/gtk2/nsWindow.cpp, change the following line (line No. 2887 for 1.9.1):
   if (!gFocusWindow && containerWindow) {
   if (containerWindow) {


6 years ago
Component: Embedding: GTK Widget → Embedding: GTK Widget
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.