mshtml: Don't do anything in exec_editmode if edit mode is already set.

This commit is contained in:
Jacek Caban 2007-06-10 11:37:37 +02:00 committed by Alexandre Julliard
parent 95e96fd547
commit 239b86fe8f
2 changed files with 7 additions and 0 deletions

View File

@ -523,6 +523,9 @@ static HRESULT exec_editmode(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
if(in || out)
FIXME("unsupported args\n");
if(This->usermode == EDITMODE)
return S_OK;
This->usermode = EDITMODE;
if(This->frame)

View File

@ -2571,6 +2571,10 @@ static void test_exec_editmode(IUnknown *unk)
IOleCommandTarget_Release(cmdtrg);
editmode = TRUE;
hres = IOleCommandTarget_Exec(cmdtrg, &CGID_MSHTML, IDM_EDITMODE,
OLECMDEXECOPT_DODEFAULT, NULL, NULL);
ok(hres == S_OK, "Exec failed: %08x\n", hres);
}
static HWND create_container_window(void)