Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2127
diff -u -p -r1.2127 ChangeLog
--- ChangeLog	19 May 2005 09:22:25 -0000	1.2127
+++ ChangeLog	2 Jun 2005 09:44:55 -0000
@@ -1,3 +1,11 @@
+2005-06-02  Mengjie Yu  <meng-jie.yu@sun.com>
+
+	* htmlengine-edit-cut-and-paste.c: (insert_object_for_undo),
+	(insert_empty_paragraph), (html_engine_delete):
+	We should emit the proper offset while insering or deleting objects.
+
+	Fixes #306238
+
 2005-05-19  Changwoo Ryu  <rganesan@novell.com>
         * htmlclueflow.c: function search_text(..) pass a non negative value to 
           g_utf8_offset_to_pointer call.
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	2 Jun 2005 09:44:59 -0000
@@ -1092,7 +1092,7 @@ insert_object_for_undo (HTMLEngine *e, H
 	html_cursor_jump_to_position_no_spell (e->cursor, e, position_after + (delete_paragraph_before ? 1 : 0));
 	insert_setup_undo (e, len, position_before + (delete_paragraph_before ? 1 : 0),
 			   dir, delete_paragraph_before, delete_paragraph_after);
-	g_signal_emit_by_name (e->widget, "object_inserted", position_before, len);
+	g_signal_emit_by_name (e->widget, "object_inserted", e->cursor->offset - 1, len);
 }
 
 static void
@@ -1817,7 +1817,7 @@ html_engine_delete (HTMLEngine *e)
 
 		if (end_position - start_position > 0) {
 			int len = end_position - start_position;
-			g_signal_emit_by_name (e->widget, "object_deleted", start_position, len);
+			g_signal_emit_by_name (e->widget, "object_deleted", e->cursor->offset - len, len);
 		}
 	}
 	html_undo_level_end (e->undo);
