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

This commit is contained in:
Alexander Surkov 2015-11-06 23:31:12 -05:00
parent 5a696decc5
commit 24f3111282

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;