зеркало из https://github.com/mozilla/pjs.git
Bug 322903 AccessibleText getTextAtOffset should not cause html pane
scrolls (fix the reverse inputs) r=aaronleventhal sr=neil
This commit is contained in:
Родитель
8e7c1c041c
Коммит
c7f0eac9f4
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче