Merge pull request #20776 from Snuffleupagus/commentManager-l10n-getDirection

Use `L10n.prototype.getDirection` rather than querying the DOM, when initializing the `CommentManager` instance
This commit is contained in:
calixteman 2026-03-02 14:45:36 +01:00 committed by GitHub
commit 0c29cc5887
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -500,9 +500,6 @@ const PDFViewerApplication = {
)
: null;
const ltr = appConfig.viewerContainer
? getComputedStyle(appConfig.viewerContainer).direction === "ltr"
: true;
const commentManager =
AppOptions.get("enableComment") && appConfig.editCommentDialog
? new CommentManager(
@ -532,7 +529,7 @@ const PDFViewerApplication = {
eventBus,
linkService,
overlayManager,
ltr,
/* ltr = */ l10n.getDirection() === "ltr",
hasForcedColors
)
: null;