Skip to content

Commit bf7e812

Browse files
committed
Also pause translation when expanding the current outline-item (PR 17176 follow-up)
Depending on the structure of the outline we could potentially need to expand a few levels, especially in long PDF documents, hence it cannot hurt to pause translation in that case as well.
1 parent f528f6f commit bf7e812

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

web/base_tree_viewer.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ class BaseTreeViewer {
161161
if (!treeItem) {
162162
return;
163163
}
164+
// Pause translation when expanding the treeItem.
165+
this._l10n.pause();
164166
// Ensure that the treeItem is *fully* expanded, such that it will first of
165167
// all be visible and secondly that scrolling it into view works correctly.
166168
let currentNode = treeItem.parentNode;
@@ -171,6 +173,8 @@ class BaseTreeViewer {
171173
}
172174
currentNode = currentNode.parentNode;
173175
}
176+
this._l10n.resume();
177+
174178
this._updateCurrentTreeItem(treeItem);
175179

176180
this.container.scrollTo(

0 commit comments

Comments
 (0)