Bug 322903 AccessibleText getTextAtOffset should not cause html pane

scrolls (fix the reverse inputs)
r=aaronleventhal sr=neil
This commit is contained in:
ginn.chen%sun.com 2006-05-16 03:57:44 +00:00
Родитель 8e7c1c041c
Коммит c7f0eac9f4
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -542,7 +542,7 @@ nsresult nsAccessibleText::GetTextHelper(EGetTextType aType, nsAccessibleTextBou
//turn off nsCaretAccessible::NotifySelectionChanged
gSuppressedNotifySelectionChanged = PR_TRUE;
PRInt32 caretOffset;
PRInt32 caretOffset = -1;
if (NS_SUCCEEDED(GetCaretOffset(&caretOffset))) {
if (caretOffset != aOffset)
SetCaretOffset(aOffset);
@ -551,6 +551,11 @@ nsresult nsAccessibleText::GetTextHelper(EGetTextType aType, nsAccessibleTextBou
*aStartOffset = *aEndOffset = aOffset;
rv = GetTextHelperCore(aType, aBoundaryType, aOffset, aStartOffset, aEndOffset, selCon, domSel, aClosure, aText);
//restore caret offset
if (caretOffset >= 0) {
SetCaretOffset(caretOffset);
}
//turn on nsCaretAccessible::NotifySelectionChanged
gSuppressedNotifySelectionChanged = PR_FALSE;