Bug 1952856 - Deal with text fragments disabled for now. r=jjaschke

I don't think this is worth a test tbh. We can remove the null-check
when we remove the pref.

Differential Revision: https://phabricator.services.mozilla.com/D241359
This commit is contained in:
Emilio Cobos Álvarez
2025-03-13 11:52:30 +00:00
parent cc26e117cb
commit e3e22e3bac

View File

@@ -920,7 +920,7 @@ export class ContextMenuChild extends JSWindowActorChild {
context.onVideo = false; context.onVideo = false;
context.inPDFEditor = false; context.inPDFEditor = false;
context.hasTextFragments = context.hasTextFragments =
!!this.contentWindow?.document?.fragmentDirective.getTextDirectiveRanges() !!this.contentWindow?.document?.fragmentDirective?.getTextDirectiveRanges()
.length; .length;
// Remember the node and its owner document that was clicked // Remember the node and its owner document that was clicked