Skip to content

Commit 0c29cc5

Browse files
authored
Merge pull request #20776 from Snuffleupagus/commentManager-l10n-getDirection
Use `L10n.prototype.getDirection` rather than querying the DOM, when initializing the `CommentManager` instance
2 parents 3cb32b6 + 0d131f0 commit 0c29cc5

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

web/app.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,6 @@ const PDFViewerApplication = {
500500
)
501501
: null;
502502

503-
const ltr = appConfig.viewerContainer
504-
? getComputedStyle(appConfig.viewerContainer).direction === "ltr"
505-
: true;
506503
const commentManager =
507504
AppOptions.get("enableComment") && appConfig.editCommentDialog
508505
? new CommentManager(
@@ -532,7 +529,7 @@ const PDFViewerApplication = {
532529
eventBus,
533530
linkService,
534531
overlayManager,
535-
ltr,
532+
/* ltr = */ l10n.getDirection() === "ltr",
536533
hasForcedColors
537534
)
538535
: null;

0 commit comments

Comments
 (0)