Before and After:
To reproduce the issue run the script in Blender's text editor:
import bpy
class TEST_OT_test(bpy.types.Operator):
bl_idname = "test.test"
bl_label = "Test"
def draw(self, context):
layout = self.layout
layout.operator("ed.undo")
layout.operator("ed.undo_history")
def execute(self, context):
return {'FINISHED'}
def invoke(self, context, event):
return context.window_manager.invoke_props_dialog(self, width=100)
bpy.utils.register_class(TEST_OT_test)
bpy.ops.test.test('INVOKE_DEFAULT')