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

Sub-Tags omit HTML5 data-* attributes when set to zero #2331

Closed
ionphractal opened this issue Apr 29, 2017 · 2 comments
Closed

Sub-Tags omit HTML5 data-* attributes when set to zero #2331

ionphractal opened this issue Apr 29, 2017 · 2 comments
Labels

Comments

@ionphractal
Copy link

@ionphractal ionphractal commented Apr 29, 2017

Help us to manage our issues by answering the following:

  1. Describe your issue:
    Riot.js doesn't output data-* attributes into HTML, when the expression is evaluated with a value of 0 on a Riot sub-tag.
    It is omitted as if it was a boolean expression.
    In opts it is properly shown as 0.
    And setting data-* on normal HTML tags works properly.
    It looks like it was introduced by the fix for #2316 .
    I would expect data-* attributes to never be omitted.

  2. Can you reproduce the issue?
    Riot 3.4.1 (working: http://plnkr.co/edit/mChKRwzoCoy7PbwCJgOB?p=preview
    Riot 3.4.3 (not working) http://plnkr.co/edit/gX0m1pRXtpHCfMTRTa9Z?p=preview
    You need to check the HTML source in the inspector to see the attribute is gone on the custom "dummy-tag" tag.

  3. On which browser/OS does the issue appear?
    at least on Linux and Windows (Mac not tested)

  4. Which version of Riot does it affect?
    >= 3.4.2

  5. How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@GianlucaGuarini GianlucaGuarini added the bug label Apr 30, 2017
@GianlucaGuarini
Copy link
Member

@GianlucaGuarini GianlucaGuarini commented Apr 30, 2017

great thanks, it will be fixed asap

@ionphractal
Copy link
Author

@ionphractal ionphractal commented Apr 30, 2017

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.