Bug 1021874 - Check if entry is current VC position before changing caret offset. r=yzen

This commit is contained in:
Eitan Isaacson 2014-06-11 09:28:55 -07:00
Родитель 92828eb5f2
Коммит bbcba97af9
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -213,7 +213,8 @@ this.ContentControl.prototype = {
let focusedAcc = Utils.AccRetrieval.getAccessibleFor(
this.document.activeElement);
if (focusedAcc && focusedAcc.role === Roles.ENTRY) {
if (focusedAcc && this.vc.position === focusedAcc
&& focusedAcc.role === Roles.ENTRY) {
let accText = focusedAcc.QueryInterface(Ci.nsIAccessibleText);
let oldOffset = accText.caretOffset;
let newOffset = aMessage.json.offset;