Open Bug 381884 Opened 17 years ago Updated 2 years ago

onfocus event is fired twice on activating the window by clicking the title bar

Categories

(Core :: Widget: Gtk, defect, P5)

x86
Linux
defect

Tracking

()

People

(Reporter: masayuki, Unassigned)

References

()

Details

See the URL:
data:text/html,<script type="text/javascript">var count=0;</script><input value="0" onfocus="this.value=++count;">

This testcase increments the numeric in the editor at onfocus events of the editor.

You set the focus to the editor, and change the active window to another application's window (i.e., deactivate the fx window).

And re-activate the fx window.

The counter should be incremented only once, but on linux it is incremented twice. (trunk/FedoraCore6)

I cannot reproduce this on Win and Mac.
log on nsWindow for linux

0x9ea2ce8 OnContainterFocusOutEvent
0xa524400 IMELoseFocus
0xa524400 LoseFocus

0x9ea2ce8 OnContainerFocusInEvent
0x9e98388 SetFocus
0x9e98388 IMESetFocus
0xa524400 SetFocus
0x9e98388 LoseFocus
0xa524400 IMESetFocus
0xa524400 SetFocus
0x9ea2ce8 OnContainerFocusOutEvent
0xa524400 IMELoseFocus
0xa524400 LoseFocus
0x9ea2ce8 OnContainerFocusInEvent
0x9e98388 SetFocus
0x9e98388 IMESetFocus
0xa524400 SetFocus
0x9e98388 LoseFocus
0xa524400 IMESetFocus
0xa524400 SetFocus

|OnContainerFocusInEvent| is called twice, is this a cause?
# the hex is a pointer to the nsWindow object.
er, this bug happens at activating the window by clicking the title bar of the window. I cannot reproduce it with Alt + Tab or clicking the other points.
Summary: onfocus event is fired twice on activate a window → onfocus event is fired twice on activating the window by clicking the title bar
I don't seem to be able to reproduce with Firefox 3.5.1 (on Linux).
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.