Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically appending math-field element causes set and highlight selection #2225

Closed
truebluepl opened this issue Dec 20, 2023 · 0 comments
Closed
Assignees
Labels

Comments

@truebluepl
Copy link

Current behaviour.

When appending dynamically created math-field element to parent element, selection is set for whole field and highlighted.
Could be unset when clicking on the field.

image

Expected behaviour.

Selection should not be set.

<!doctype html>
<html lang="en" class="no-js">
<meta charset="utf-8">
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<script defer src="https://unpkg.com/mathlive"></script>
<meta name="viewport" content="initial-scale=1, width=device-width" />
</head>
<body>

<script>
window.addEventListener('DOMContentLoaded', function() {
  let field = document.createElement("math-field");
  field.value = '2+2=4';
  document.body.appendChild(field);
});
</script>

</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants