MithrilJS / MithrilJS/mithril.js

Textarea vnode sync bug

Open
#3,063 3 comments 0 reactions 1 assignee View on GitHub

@dead-claudia is already working on this.

Since Dec 24, 2025.

Area: Core
Dominant language
JavaScript
Stars
14.5k
Forks
922
PR merge metrics
No merged PRs in 30d

Description

Is there an existing issue for this?
  • I have searched the existing issues
Mithril.js Version

2.3.8

Browser and OS

Chrome 143
macOS 14.5

Project

No response

Code
https://flems.io/#0=N4IgzgpgNhDGAuEAmIBcIC2BLeALATllAHQBWYIANCAGZEQWoDaoAdgIYYRojG7wYoVELAD2rRBJ4AeMLEIAHeAAIw+WAF4AOiH7wFYVAHojAV1YKA1gHNiYjEex5CURzgJEyYHQD5pRuUV4Hy1WYUgYBCxxRhAABlQARgBmAFoEgBYAThAAX0o2Tm50Jw8ScmExCQgpdDyCkA4uHi9K8Ul4HhpzKPFlAEEFBQAKAEplYFDlZSqwFTn2RGUNCanpmdEMBXEa+FRlHQBhRJ013LW1-Ah4U3xWVfv1gDcsCAB3fbHlnwf19aubndlEw1n9phhhjpcCcqAcQAARCAYUQ6UaUUFgiEYsFwgBGpng8HEOnRjxx00mZPJ03EsCgWFglk+4w0PwWiDsm22rF2yzhx1OVJx+WxYKOXJ2EjhoumaJlyixQrFIHxhOJVHlFM161p9MZzO+qngiwgnK2kpUKyOACZBdTpiKlX9xeaeVLbSB5XKnUaTWbubyNEH+TDlAB+YHaiEAciQWCe0dJ9vWWJAiAAHsaruwSXCAGow0baos+gC6yn2IJ94OGsfjie1NZ0GazEBzsJ0eY9JeTPfJpaTYNLGPOj1Ho9CGGIyPM8GGSFEsFMXAkxFxoiQAE9KAMhqNwtA4PBoqxYgA2JIAdnqhWa6DsYAo1CqHR4eVLuSAA
Steps to Reproduce

Setup:
A Mithril component that renders two different textareas at the same place in the dom tree. This could be a form component that loads different forms depending on the current route.

  1. Modify the textarea's value.
  2. Click btn "Component 2".
Expected Behavior

The textarea loads the contents "V2"

Observed Behavior

The previous textarea value is shown, instead of "V2".

Context

Need a workaround where the form is padded with empty vnodes so that mithril doesn't consider the textareas being the same element.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.