0.80.0 2022-09-27
Issues Resolved
- #1540 When changing the
readonly
or disabled
attribute of a mathfield,
hide the virtual keyboard if the mathfield had the focus. - #1641 A read-only mathfield would still accept inline shortcuts.
- #1618 In some cases, on touch-capable devices the OS virtual keyboard
would be displayed instead of the virtual keyboard.
- #1620 On devices with a touch screen and a physical keyboard (Lenovo Yoga,
Chromebooks), pressing the Enter key would input the string
Enter
into
the mathfield. - #1631 Hit-testing detection improvements
- #1640 An
input
event was dispatched when the value of the mathfield was
changed programatically. - #1330 Make MathLive
convertLatexToMarkup()
usable from Node.js - #1641 Correctly render units in a chemical equation, e.g.
\pu{123 kJ//mol}
. - #1643 Physical units with multiplication are now rendered correctly, e.g.
\pu{123 J*s}
.
New Features
- #1541 To be notified when the visibility of the virtual keyboard changes
and using
makeSharedVirtualKeyboard()
, listen for the
virtual-keyboard-toggle
on the object returned by
makeSharedVirtualKeyboard()
:
const k = makeSharedVirtualKeyboard();
k.addEventListener('virtual-keyboard-toggle', (ev) =>
console.log('toggling ', ev)
);
- The
math-mode
event is now cancelable (by calling .preventDefault()
on the
event). This can be used for example to turn off the ability to switch to the
LaTeX editing mode:
// Prevent change to LaTeX (or text) mode
mf.addEventListener('mode-change', (ev) => ev.preventDefault(), {
capture: true,
});
- The command
plonk
was added. It plays a sound indicating an error, and can
associated with a keybinding, or triggered with mf.executeCommand()
. - To determine the offset (caret position) in a mathfield given a viewport
coordinate, use
mf.offsetFromPoint()
. - #1641 Support for the
\mathchoice
command. - #1643 Support for the
\kern
, \mkern
and \mspace
command.