Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/arnog/mathlive
Browse files Browse the repository at this point in the history
  • Loading branch information
arnog committed Jan 18, 2025
2 parents 11cf00b + 1b8516f commit 4f34e3c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions css/mathfield.less
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@
// }
// }

.ML__caret {
display: inline-block;
}

.ML__caret::after {
content: '';
visibility: hidden;
Expand Down
14 changes: 8 additions & 6 deletions src/public/mathfield-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1922,13 +1922,15 @@ import "https://unpkg.com/@cortex-js/compute-engine?module";
// Ignore blur events if the scrim is open (case where the variant panel
// is open), or if we're in an iFrame on a touch device (see #2350).

if (evt.type !== 'blur') return;

const touch = isTouchCapable();

if (touch && window?.mathVirtualKeyboard?.visible) return;
// Otherwise we disconnect from the VK and end up in a weird state.
if (
evt.type === 'blur' &&
Scrim.scrim?.state === 'closed' &&
!(isTouchCapable() && isInIframe())
)
this._mathfield?.blur();
if (Scrim.scrim?.state !== 'closed' || (touch && isInIframe())) return;

this._mathfield?.blur();
}

/**
Expand Down

0 comments on commit 4f34e3c

Please sign in to comment.