Commit 512d0924 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Fix range pos after put_text call.

parent b0efe7f8
......@@ -361,6 +361,9 @@ static void test_txtrange(IHTMLDocument2 *doc)
test_range_expand(range, wordW, VARIANT_TRUE, "test ");
test_range_put_text(range, wordW);
test_range_text(body_range, "wordabc 123\r\nit's text");
test_range_text(range, NULL);
test_range_moveend(range, characterW, 3, 3);
test_range_text(range, "abc");
IHTMLTxtRange_Release(range);
IHTMLTxtRange_Release(body_range);
......
......@@ -893,7 +893,11 @@ static HRESULT WINAPI HTMLTxtRange_put_text(IHTMLTxtRange *iface, BSTR v)
if(NS_FAILED(nsres))
ERR("InsertNode failed: %08x\n", nsres);
return S_OK;
nsres = nsIDOMRange_SetEndAfter(This->nsrange, (nsIDOMNode*)text_node);
if(NS_FAILED(nsres))
ERR("SetEndAfter failed: %08x\n", nsres);
return IHTMLTxtRange_collapse(HTMLTXTRANGE(This), VARIANT_FALSE);
}
static HRESULT WINAPI HTMLTxtRange_get_text(IHTMLTxtRange *iface, BSTR *p)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment