Bug 1220897 - fix IAccessible2::get_accessibleWithCaret, r=tbsaunde

This commit is contained in:
Alexander Surkov 2015-11-06 23:31:12 -05:00
parent 38f6c60742
commit 00ba473e42

View File

@ -663,14 +663,15 @@ ia2Accessible::get_accessibleWithCaret(IUnknown** aAccessible,
return S_FALSE;
Accessible* child = accWithCaret;
while (child != acc)
while (!child->IsDoc() && child != acc)
child = child->Parent();
if (!child)
if (child != acc)
return S_FALSE;
*aAccessible = static_cast<IAccessible2*>(
static_cast<AccessibleWrap*>(accWithCaret));
(*aAccessible)->AddRef();
*aCaretOffset = caretOffset;
return S_OK;