Skip to content

fix: Enable user selection for math static elements - #3061

Open
tsuji-riya wants to merge 1 commit into
arnog:masterfrom
tsuji-riya:fix-math-static-elements-user-select
Open

fix: Enable user selection for math static elements#3061
tsuji-riya wants to merge 1 commit into
arnog:masterfrom
tsuji-riya:fix-math-static-elements-user-select

Conversation

@tsuji-riya

Copy link
Copy Markdown
Contributor

I would like to enable user selection on <math-span /> and <math-div /> elements.

To do this, I removed user-select: none from the .ML__latex CSS class in core.less, so users can now select and copy the math content.

But this had a side effect: the _mathMLContainer (a hidden MathML element used for screen readers/accessibility) also became selectable, causing the same math expression to be duplicated when copied. To fix this, I added user-select: none directly on _mathMLContainer in math-static-elements.ts, so only that element is excluded from selection/copy while the visible math stays selectable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant