diff --git a/CHANGELOG.md b/CHANGELOG.md index 32d20b0cb..829772973 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,8 @@ `\slshape`, `\scshape`, `\rmfamily`, `\sffamily`, `\ttfamily` are now interpreted correctly. - The command `\operatorname` is now spoken correctly +- **#2152** On Safari, fill-in-the-blank prompts containing a fraction were + rendered incorrectly. ## 0.98.5 _2023-12-27_ diff --git a/src/atoms/prompt.ts b/src/atoms/prompt.ts index 3e41cc751..f8d29633b 100644 --- a/src/atoms/prompt.ts +++ b/src/atoms/prompt.ts @@ -142,6 +142,10 @@ export class PromptAtom extends Atom { // The result is a box that encloses the box and the base const result = new Box([box, base], { classes: 'ML__prompt-atom' }); + + // Needed for Safari (https://github.com/arnog/mathlive/issues/2152) + base.setStyle('line-height', 1); + // Set its position as relative so that the box can be absolute positioned // over the base result.setStyle('position', 'relative');