Closed Bug 120529 Opened 23 years ago Closed 20 years ago

controls do not lose :focus when the window does

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows 98
defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME
mozilla1.1alpha

People

(Reporter: ian, Assigned: saari)

References

Details

Attachments

(1 file)

STEPS TO REPRODUCE
   1. Open a dialog, e.g. File | Page Setup
   2. Focus a control, e.g. the Orientation drop down or the Cancel button.
   3. Alt Tab to another window.

EXPECTED RESULTS
   The control focussed in step 2 should lose its :focus styles as soon as the
   window itself loses focus.

ACTUAL RESULTS
   The control does not lose its focus until you mouse over it (with it in the
   background, that is).

Maybe we are actually removing the focus internally but just not repainting?
Target Milestone: --- → mozilla1.1
QA Contact: madhur → rakeshmishra
Blocks: 140346
Attached file A test case
Reproduction instructions:
   1. Set focus on some input control (border and background should change)
   2. Move focus to another tab: Click on existing tab, or open 
      a new tab (ctrl+T) or right click on a link and open it in new tab
   3. Switch back to a tab with this document (focus remains on 
      previously focused control)
   4. Set focus to another control - both controls appear to be 
      in focus, previous control does not lose focus
   5. Continue if you wish "focus" on more controls :)

I hope this will make solving this bug easier. 
TNX!
Stefan
QA Contact: rakeshmishra → trix
I tried the testcase (an excellent one, btw) in attachment 99094 [details] with build
2003020708 under XP Pro SP1 and noticed the focus bug on the input element
(focus remains on previously focused control).
.
Assignee: joki → saari
QA Contact: trix → ian
I tried the testcase with Mozilla 1.7b build 2004031309)under XP Pro SP1 and I
got the expected results (step 4): the previous control lose focus and the other
(next) control got focus.

WORKSFORME
The test case works for me, but the case in Comment #0 behaves exactly as described.

{ WinXP SP2, Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3)
Gecko/20040831 }
I've exercised the steps given in the test case, and the described behaviour
cannot be reproduced.  This problem may have been fixed recently.

Using Mozilla 1.8a4 build 2004092705
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a4) Gecko/20040927

Closing this bug, since the issue described above can no longer be reproduced. 
Ian, feel free to reopen this bug if you see this again in future builds.  Thanks!
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: