Closed Bug 434372 Opened 17 years ago Closed 16 years ago

Firefox steals focus when opens XUL panel in background

Categories

(Core :: Widget, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: kazuho, Unassigned)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9pre) Gecko/2008051304 Minefield/3.0pre Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9pre) Gecko/2008051304 Minefield/3.0pre Firefox window steals a focus and becomes an active window when extension program opens xul:panel element in background. Reproducible: Always Steps to Reproduce: 1. create xul:panel element and set timer to open it 2. focus other window 3. call xul:panel::openPopup Actual Results: Firefox window become an active window and xul:panel window pops up Expected Results: just open xul:panel window in background This issue happens on Windows XP before, but now it isn't happen anymore. But it still happens in ubuntu Linux
Let me fix reproduce step: 1. create xul:panel element with set attribute "noautohide" is 'true' 2. open the panel from java script program 3. the panel steal the window focus
Version: unspecified → Trunk
This is a sample xpi program which reproduce bug 434372 on Firefox 3 RC1 or later with Ubuntu Linux 7.10 or later.
Attachment #322694 - Flags: review?
Attachment #322694 - Flags: review? → review?(enndeakin)
Flags: blocking-firefox3?
Need confirmation here, and don't know if this is in the right component. Won't block Firefox 3.0, but if it's a simple fix might be candidate for a 3.0.x release.
Flags: blocking-firefox3?
Attachment #322694 - Flags: review?(enndeakin)
Status: UNCONFIRMED → NEW
Component: OS Integration → Widget
Ever confirmed: true
Product: Firefox → Core
Likely a widget focus issue, like something calling nsIWidget::SetFocus. Doesn't happen on Mac, but see the issue on Windows.
QA Contact: os.integration → general
The TwitterFox extension exhibits this behavior on Firefox 3.0 on Linux.
(In reply to comment #5) > The TwitterFox extension exhibits this behavior on Firefox 3.0 on Linux. > Confirmed. Firefox 3, TwitterFox 1.5.7, and Ubuntu 8.04.
Is someone working on this issue?
This is quite bothersome.
This also appears on FF3/Twitterfox/XP home.
FF3/TwitterFox/Fedora 10.
FF3.0.5 / TwitterFox 1.7.4 / Ubuntu 8.10
Minefield 3.1b2 / TwitterFox 1.7.7 / Fedora 11 (rawhide)
This problem is also occuring on FF 3.0.8 / TwitterFox 1.7.7.1 /XP professional sp 3
Confirmed in Firefox 3.0.8 under Ubuntu 8.10, using the TwitterFox extension.
Firefox 3.0.5 / TwitterFox 1.7.7.1/ Windows XP pro I hope the details (on affecting platform) can be updated
FF 3.0.8 / Ubuntu 8.04 / Twitterfox 1.7.7.1
FF 3.0.9 / Ubuntu 9.04 / Twitterfox 1.7.7.1
FF Portable 3.0.10 / Win XP Pro / Twitterfox 1.7.7.1
FF 3.0.10 / Ubuntu 9.04 (including all proposed updates) / Twitterfox 1.7.7.1
FF 3.0.11 / Ubuntu 9.04 / TwitterFox 1.8.2
Confirmed on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20090818 Minefield/3.7a1pre When a panel is noautohide="true", it won't receive a focus event until the some other element is focused. It is not possible to select text using dragging mouse. It is possible by double clicking and ctrl works as expected too. It is not possible to start typing by left clicking in textbox until, after the click on textbox, the focus is lost to some other element, like menus, scrollbars, statusbar but not the content window or url bar. If popup is clicked, focus is again lost from the textbox after this "lose focus" workaround. It is possible to bring context menu by right clicking. It is possible to paste text by middle click. Pasting text do not prevent textbox from clearing the content after receiving focus. Popup seem to be prevented from dispatching the focus events before losing the focus. Actual keyboard focus stays with the textbox if not lost to another element so it is possible to type in it. Right click on the statusbar label to toggle the popup after installing the text case.
I can't reproduce this bug any more. Regardless, neither testcase even demonstrates the bug according to the original steps. It mentions that the popup is opened on a timer, yet no timer is used in the test. I'm going to close for now. Reopen if you attach a testcase that demonstrates this bug as described in the first comment.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
https://bugzilla.mozilla.org/show_bug.cgi?id=434372#c1 States that a timer is not necessary. Please check the rest of the comments also.
Then the reporter (or anyone) should clarify the exact steps and provide a simple testcase showing exactly what the bug is.
Steps to reproduce for 3.6pre2 and 3.7pre1: 1. Create a xul:panel with noautohide="true". Create a xul:box with style="-moz-user-select:text" along with some text inside and a xul:textbox inside it for demonstration purposes. 2. Call openPopup() by any means. 3. Click on the textbox. Observe that it doesn't capture focus. 4. Click on some other element that doesn't receive text input, like scrollbar or statusbar. Observe the main window getting focus. Observe the textbox getting keyboard focus. Now it is possible to type in it. 6. Click on the textbox. Observe textbox not getting focus. 8. Right click on the textbox. Observe context menu. 9. Try selecting xul:box text by dragging. Observe that the text is not selected. 10. Click the first character of the box text. Holding down shift, click the last character. Observe that the text is selected. 11. Middle click to the textbox. Observe the selected text is correctly copied. In essence, it is as if the dispatch of the some actions of a left click is delayed until the popup has lost its focus.
That isn't this bug. That's either bug 385609, bug 506173 or some variation of them.
FF-Shiretoko 3.5.2 / Ubuntu 9.04 / TwitterFox 1.8.3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: