提交 aa0b6df8 编写于 作者: E Eitan Isaacson

Bug 1298436 - Don't get caught in an endless loop when narrating last...

Bug 1298436 - Don't get caught in an endless loop when narrating last paragraph. r=jaws, a=lizzard CLOSED TREE

This version does not have the breaking test.

MozReview-Commit-ID: 7OZctto5QBF

--HG--
extra : source : aaca2a928eda6417bef2fde8ad5fa5a45c5fc3af
上级 9eaef53f
......@@ -144,8 +144,8 @@ Narrator.prototype = {
this._win.speechSynthesis.cancel();
let tw = this._treeWalker;
let paragraph = tw.currentNode;
if (!paragraph) {
tw.currentNode = tw.root;
if (paragraph == tw.root) {
this._sendTestEvent("paragraphsdone", {});
return Promise.resolve();
}
......@@ -193,7 +193,7 @@ Narrator.prototype = {
// User pressed stopped.
resolve();
} else {
tw.nextNode();
tw.currentNode = tw.nextNode() || tw.root;
this._speakInner().then(resolve, reject);
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册