Index: src/gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.574
diff -u -p -r1.574 gtkhtml.c
--- src/gtkhtml.c	11 Aug 2004 17:30:55 -0000	1.574
+++ src/gtkhtml.c	22 Aug 2004 12:03:17 -0000
@@ -864,6 +864,7 @@ key_press_event (GtkWidget *widget, GdkE
 	GtkHTML *html = GTK_HTML (widget);
 	GtkHTMLClass *html_class = GTK_HTML_CLASS (GTK_WIDGET_GET_CLASS (html));
 	gboolean retval, update = TRUE;
+	HTMLEngine *e;
 
 	html->binding_handled = FALSE;
 	html->priv->update_styles = FALSE;
@@ -896,9 +897,19 @@ key_press_event (GtkWidget *widget, GdkE
 		switch (event->keyval) {
 		case GDK_Return:
 		case GDK_KP_Enter:
-			if (html->engine->focus_object) {
+			e = html->engine;
+			/* the toplevel gtkhtml's focus object may be a frame or ifame */
+			while (e->focus_object) {
+				if (HTML_IS_FRAME (e->focus_object))
+					e = GTK_HTML (HTML_FRAME (e->focus_object)->html)->engine;
+				else if (HTML_IS_IFRAME (e->focus_object))
+					e = GTK_HTML (HTML_IFRAME (e->focus_object)->html)->engine;
+				else
+					break;
+			}
+			if (e->focus_object) {
 				gchar *url;
-				url = html_object_get_complete_url (html->engine->focus_object, html->engine->focus_object_offset);
+				url = html_object_get_complete_url (e->focus_object, e->focus_object_offset);
 				if (url) {
 					/* printf ("link clicked: %s\n", url); */
 					g_signal_emit (html, signals [LINK_CLICKED], 0, url);
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/ChangeLog,v
retrieving revision 1.277
diff -u -p -r1.277 ChangeLog
--- ChangeLog	21 Aug 2004 00:35:05 -0000	1.277
+++ ChangeLog	22 Aug 2004 12:03:18 -0000
@@ -1,3 +1,9 @@
+2004-08-22  Eric Zhao  <eric.zhao@sun.com>
+
+	* src/gtkhtml.c: (key_press_event): the focus object may be a frame or
+	an iframe, if so, check its focus object recursively. Fixes bug
+	#63597.
+
 2004-08-21  Kjartan Maraas  <kmaraas@gnome.org>
 
 	* configure.in: Add «nb» to ALL_LINGUAS.
