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

NEW
Unassigned

Status

()

Core
Widget: Gtk
11 years ago
9 years ago

People

(Reporter: masayuki, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

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.
(Reporter)

Updated

11 years ago
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).
You need to log in before you can comment on or make changes to this bug.