Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2128
diff -u -p -r1.2128 ChangeLog
--- ChangeLog	3 Jun 2005 04:16:03 -0000	1.2128
+++ ChangeLog	21 Jun 2005 08:57:36 -0000
@@ -1,3 +1,10 @@
+2005-06-21  Mengjie Yu  <meng-jie.yu@sun.com>
+
+	* htmlengine-edit-cut-and-paste.c: (html_engine_delete):
+	We should emit the object_deleted signal before we really delete it.
+
+	Fixes #306238
+
 2005-05-03  Srinivasa Ragavan <sragavan@novell.com>
 	* gtkhtml.c (selection_received), (drag_data_received):
 	  Added code to support DnD of evolution mail, contacts, caldendar,
Index: htmlengine-edit-cut-and-paste.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine-edit-cut-and-paste.c,v
retrieving revision 1.111
diff -u -p -r1.111 htmlengine-edit-cut-and-paste.c
--- htmlengine-edit-cut-and-paste.c	13 Apr 2005 15:35:32 -0000	1.111
+++ htmlengine-edit-cut-and-paste.c	21 Jun 2005 08:57:38 -0000
@@ -1769,6 +1769,10 @@ html_engine_delete (HTMLEngine *e)
 		gint start_position = start->position;
 		gint end_position = end->position;
 
+		if (end_position - start_position > 0) {
+			int len = end_position - start_position;
+			g_signal_emit_by_name (e->widget, "object_deleted", start_position, len);
+		}
 
 		while (start->position < end->position) {
 			if (check_for_simple_delete (start->object, end->object)) {
@@ -1815,10 +1819,7 @@ html_engine_delete (HTMLEngine *e)
 			html_cursor_destroy (end);
 		html_cursor_jump_to_position (e->cursor, e, start_position);
 
-		if (end_position - start_position > 0) {
-			int len = end_position - start_position;
-			g_signal_emit_by_name (e->widget, "object_deleted", start_position, len);
-		}
+
 	}
 	html_undo_level_end (e->undo);
 }
