mathlive
mathlive copied to clipboard
[FEATURE] API to disable selection
Description
I want to disable selection in math-field, but css property userSelect: 'none' doesn't seems to work with mathlive, I guess mathlive has its own system to handle selection? And I look through the documentation without finding any API to disable selection, I wonder if it's possible to add an API to disable selection.
Steps to Reproduce
React Code Example
import MathView from 'react-math-view'; // just a wrapper to use mathlive in react
function MathKey(content: string) {
return (
<MathView
value={content}
readOnly={true}
style={{ userSelect: 'none' }}
/>
);
}
Actual Behavior
Can still select content when set userSelect: 'none' .

Expected Behavior
An new API to disable selection.
Environment
MathLive version 0.69.4
Operating System Windows10
Browser Chrome
Alternatively, the math-field component should respect the user-select: none property, since that seems the reasonable and intuitive thing to do.
Yes, I agree that user-select: none is a better way to do this.
Fixed in mathlive 0.90.0