Closed Bug 64079 Opened 24 years ago Closed 24 years ago

[MF][FIX][CBX]Drop-down listbox should disappear when it loses focus

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows 98
defect
Not set
minor

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Assigned: rods)

Details

(Whiteboard: Fix in hand)

Attachments

(1 file)

Steps to reproduce:
1. Load http://bugzilla.mozilla.org/query.cgi and scroll down to the "boolean 
chart" section.
2. Click on the leftmost drop-down menu.
3. Hit tab.

Result: drop-down sticks around, but focus moves to another control.
Expected result: drop-down goes away, and focus moves to another control.
(This seems to be a "better" bug than mine, bug 62425)
When it lose focus it needs to rollup the drop down.
Status: NEW → ASSIGNED
Summary: Drop-down listbox should disappear when it loses focus → [MF][FIX][CBX]Drop-down listbox should disappear when it loses focus
Whiteboard: Fix in hand
Attached file simple patch
If you use this patch, please also change the spelling of "// Thiis ..." one
line further down in the patch.
Patch;
Index: nsComboboxControlFrame.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp,v
retrieving revision 1.155
diff -u -r1.155 nsComboboxControlFrame.cpp
--- nsComboboxControlFrame.cpp	2000/12/20 23:25:39	1.155
+++ nsComboboxControlFrame.cpp	2001/01/02 16:28:47
@@ -496,7 +498,14 @@
 void 
 nsComboboxControlFrame::SetFocus(PRBool aOn, PRBool aRepaint)
 {
-  mFocused = aOn?this:nsnull;
+  if (aOn) {
+    mFocused = this;
+  } else {
+    mFocused = nsnull;
+    if (mDroppedDown) {
+      ToggleList(mPresContext);
+    }
+  }
   // Thiis is needed on a temporary basis. It causes the focus
   // rect to be drawn. This is much faster than ReResolvingStyle
   // Bug 32920
patch looks good.
r=kmcclusk@netscape.com
Looks good to me too.  :)  r=pollmann@netscape.com
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Verfied build 20010730 os:win95/win98
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: