After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 424656 - GTKComboBoxEntry does not respond to arrow keys when focus is in text field
GTKComboBoxEntry does not respond to arrow keys when focus is in text field
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
2.8.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-03-30 21:50 UTC by Bogdan Gheorghe
Modified: 2017-08-22 11:37 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description Bogdan Gheorghe 2007-03-30 21:50:01 UTC
Please describe the problem:
In GTK2.6.10, GTKComboBoxEntry allows the user to scroll up and down the list when the focus is in the text field by using the arrow keys. In GTK 2.8.20 and GTK 2.10.6, GTKComboBoxEntry *does not* allow the user to scroll with the arrow keys unless the focus is on the arrow button. Note that the combo box is being created with gtk_combo_box_entry_new_text().

Steps to reproduce:
Here is a simple snippet program that creates a combo box and populates it with three items.

#include <gtk/gtk.h>

int main (int argc, char** argv) {
	GtkWidget *shellHandle, *comboHandle;   

 	gtk_init_check (&argc, &argv);
	shellHandle = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	comboHandle  = gtk_combo_box_new();//gtk_combo_box_entry_new_text();

	gtk_combo_box_append_text(GTK_COMBO_BOX(comboHandle), "aaaaa");
	gtk_combo_box_append_text(GTK_COMBO_BOX(comboHandle), "bbbbb");
   	gtk_combo_box_append_text(GTK_COMBO_BOX(comboHandle), "ccccc");
 
	gtk_container_add (GTK_CONTAINER (shellHandle), comboHandle);
	
	g_signal_connect (G_OBJECT (shellHandle), "destroy", G_CALLBACK (gtk_main_quit), NULL);
	g_signal_connect (G_OBJECT (shellHandle), "delete_event",G_CALLBACK (gtk_main_quit), NULL);

 	gtk_window_move (GTK_WINDOW(shellHandle), 200, 200);
	gtk_widget_show_all (shellHandle);
	gtk_main();
	return 0;
}

Actual results:
Run the program, set focus to the text field and hit the up and down arrow keys. Notice that none of the list items are selected. Set focus to the arrow button. Hit the up and down arrow keys, notice how list items are selected.

Expected results:
I would expect to be able to select entries in a combo list while still in the text field by using the up/down arrow keys.

Does this happen every time?
Yes

Other information:
Comment 1 Daniel Boles 2017-08-22 11:37:07 UTC
Works for me on GTK+ 2.24, with some required fixes to the test case.