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

style attribute with expressions makes show directive invalid at the beginning #2178

Joylei opened this issue Dec 25, 2016 · 4 comments


Copy link

@Joylei Joylei commented Dec 25, 2016

Help us to manage our issues by answering the following:

  1. Describe your issue:

if there are expressions in style attribute, the show directive would not work at the beginning

      <button onclick="{ toggle }">toggle</button>
      <p show="{ selected }" style="height:{ height };">should be hidden when inited</p>
      this.selected = false
      this.height = 'auto'
      this.toggle = ()=>{
        this.selected = !this.selected
  1. Can you reproduce the issue?,output

  1. On which browser/OS does the issue appear?
    macOS 10.12.2; Chrome 55
  2. Which version of Riot does it affect?
  3. How would you tag this issue?
  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@rsbondi rsbondi added the bug label Dec 25, 2016
Copy link

@GianlucaGuarini GianlucaGuarini commented Jan 9, 2017

I think it's related to #2158

Copy link

@rsbondi rsbondi commented Jan 9, 2017

I believe style=whatever is overriding the display: none set by show, maybe if this was handled in update it would solve both issues

Copy link
Contributor Author

@Joylei Joylei commented Jan 11, 2017


Copy link

@rsbondi rsbondi commented Jan 20, 2017

@rsbondi rsbondi added the duplicate label Jan 20, 2017
GianlucaGuarini added a commit that referenced this issue Mar 26, 2017
GianlucaGuarini added a commit that referenced this issue Mar 26, 2017
* master:
  updated: fixed wrong text in the readme file
  updated: libraries sizes
  added: support for style and class object attributes
  closes #2178
  updated: simplified the special expressions updates
  updated: cleaning up the update method
  updated: dbmon frames rendering strategy
  closes #2080
  closes #2103
  fixed: make sure that the riot version gets exported as string
  updated: dev dependencies
  Enable syntax highlighting of tag files
  updated: small optimization avoiding the shouldUpdate check for the anonymous tags
  updated: dev dependencies
  Delete a duplicate line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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