Skip to content

Commit

Permalink
fix: fixed #2152
Browse files Browse the repository at this point in the history
  • Loading branch information
arnog committed Jan 27, 2024
1 parent f59a5f9 commit c491856
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_

Expand Down
4 changes: 4 additions & 0 deletions src/atoms/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit c491856

Please sign in to comment.