Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ts/ui/lazy/LazyHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { HTMLHandler } from '../../handlers/html/HTMLHandler.js';
import { SpeechMathItem } from '../../a11y/speech.js';
import { handleRetriesFor } from '../../util/Retries.js';
import { OptionList } from '../../util/Options.js';
import { StyleJson } from '../../util/StyleJson.js';

/**
* Add the needed function to the window object.
Expand Down Expand Up @@ -388,6 +389,19 @@ export function LazyMathDocumentMixin<
*/
protected lazySet: LazySet = new Set();

/**
* Extra styles for lazy nodes.
*/
public static lazyStyles: StyleJson = {
'mjx-lazy': {
//
// Needed for Safari 26 when the math appears inside an othewise empty
// node with overflow: auto. See issue #3579.
//
display: 'inline-block',
},
};

/**
* Augment the MathItem class used for this MathDocument,
* then create the intersection observer and lazy list,
Expand All @@ -400,6 +414,7 @@ export function LazyMathDocumentMixin<
*/
constructor(...args: any[]) {
super(...args);
this.addStyles((this.constructor as typeof BaseClass).lazyStyles);
//
// Use the LazyMathItem for math items
//
Expand Down
Loading