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

Data binding does not update for transpiled app #3072

Closed
Juanc1to opened this issue Jan 20, 2021 · 1 comment · Fixed by #3080
Closed

Data binding does not update for transpiled app #3072

Juanc1to opened this issue Jan 20, 2021 · 1 comment · Fixed by #3080
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. 🐞 bug Something isn't working

Comments

@Juanc1to
Copy link

Version

3.0.5

Reproduction link

https://github.com/Juanc1to/issue-vue-3-transpile-binding.git

Steps to reproduce

  1. Clone, run npm i, then npm run build in the cloned repository.
  2. In the dist directory, run python -m http.server, then navigate to "http://localhost:8000/" in your browser.
  3. Choose "Add an item" twice.
  4. For the second item, choose "Check", then change the selection for that item to "Tails", then change it back to "Heads".

What is expected?

The string "Correct (true)!" should be displayed at the end of this sequence.

What is actually happening?

"Correct (true)!" is initially displayed, then on updating the guess to "Tails", the notification is changed to "Alas, it's actually Heads.", and the notification does not update back to "Correct (true)!" when updating the guess (a second time) to "Heads".


This happens with npm run build, but not with npm run serve. With the app being deployed with the development server, the app works as expected. As a result, this may be a bug somewhere in the toolchain; if so, I would be grateful for advice about where best to report this.

@HcySunYang HcySunYang added 🐞 bug Something isn't working ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. labels Jan 21, 2021
@HcySunYang
Copy link
Member

The hoisted DOM may be reused, since only static DOM nodes will be hoisted, therefor we use cloneNode to generate clones of it in the production env, but this will not copy custom DOM props.
In the patchDOMProp, we store the actual value of DOM in the _value property, so we need to keep it when doing clones.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. 🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants